+ 1
I am unable to understand call by value and call by referance concept
2 Antworten
+ 7
Here is a good article on this topic you may find interesting
http://www.cplusplus.com/forum/lounge/62708/
+ 3
Value:
I only care about the value. What x is equal to.
Reference:
I only care about the variable. X.
Since passing reference only cares about the variable, you can change the actual value of the variable by passing the reference.
However, for passing by value I cannot change the variable itself, only use the value of the variable however I like.