+ 2
Difference between friend class and friend member function?
I want to know how the friend class works?. because Even friend member functions can be used to access both regular and the private variables across classes. Then what is a friend class?? can anyone tell me please?
1 Resposta
+ 11
Friend function is a function that is able to access the private and protected members of a class. In contrast, a friend class is a classwhich help in accessing the privatemembers of a class. A friend functionis declared by including its prototype inside the class, antecede it with thekeyword friend.
https://techdifferences.com/difference-between-friend-function-and-friend-class.html