+ 4
When and when not to use friend function
I am a bit confused if to make all function either member function or friend function since either of these has access to private variables.
2 Answers
+ 6
Make them friend (always the best choice)
+ 4
use friend functions only when you think the functions may need to change private value....if you want your functions not to change value of other classes or if you want private value to be untouched by a function, don't make them friend