friendship

hello ,
I want to ask If there is any difference between friend and scope operator ?
A class friend is something that can access the class private members.
The scope operator is used to get symbols from namespaces or classes and can be used for class static members. ::something means that 'something' is from the global scope

Here is a tutorial on friendship: http://www.cplusplus.com/doc/tutorial/inheritance/
so you mean both have the same function and we can use it alternatively.
No, they aren't related.
Topic archived. No new replies allowed.