Technical Discussion :: C++
Home > Technical Interview Q&A > C++ > Discussion

Binod
23 Feb, 2019 5:07 AM
By using a friend function.
A friend function has access to all private and protected members of the class for which it is a friend.
A friend function has access to all private and protected members of the class for which it is a friend.