Friend function is a friend of a class that is allowed to access to Public, private or protected data in that same class. If the function is defined outside the class cannot access such information.
Friend can be declared anywhere in the class declaration, and it cannot be affected by access control keywords like private, public or protected.
Friend can be declared anywhere in the class declaration, and it cannot be affected by access control keywords like private, public or protected.
No comments:
Post a Comment