0
Should we pass variables of objects in function of class to access them in function and also manipulate them?
If we are changing their value would the affect the object variables in main()
3 Antworten
+ 1
It depends....
Some people say, it is a better style to do so.
Actually if u pass an object to a function, it is a call by reference so the object in main is effected.
+ 1
For which of the languages are you asking? The different languages treat it differently.
0
HonFu c++