Passing by reference not always the best
I think if I'm passing an int into a function, and provided that I am not making changes to the int, passing it by value is better than passing it by reference.
Because passing by value will copy the int onto the stack, so the program can directly access the int value.
On the other hand, passing by reference will copy the address of the int onto the stack, and the program will need to go to the location of the int to access its value.
Am I right to say this? Please correct me if I'm wrong... :)