+ 1
What is the difference between using friend function and scope resolution operator outside a class?
what are are their basic difference and pros and cons?
1 Antwort
+ 4
You cannot use a private method of a class using the scope resolution operator outside the class.
Using friend function gives full access to data to the friend function and thus, it is very helpful.