Question #277757

Explain friend function


Expert's answer

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.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS