0
why the object pass to the friend function in declaration is different from invocation? (declaration with & and calling without & operator)
3 Answers
+ 1
To change any variable in a class if wanted then we should use & operator
0
when & is used any change in function variable will also result in change in the actual variable. When & is not used the actual variable only passes value and does not undergo any change.
0
when & is used. Funtion will point to address on memory and make change valiable when funtion change