Explain friend function
A friend function is one that is declared outside of a class yet has access to the class's private and protected members. In programming, there may be times when we wish two classes to share their members. Data members, class functions, and function templates are examples of these members.
Comments
Leave a comment