+ 1
The concept of friend function is like a loophole in C++,then what is the purpose of using it??
2 Antworten
+ 9
Hi Rajdeep!
A friend function is an option (loophole) that allows access to private and protected members of a class. Say you needed to access private or protected members from 2 different classes...
0
Hello ATK,what you said is absolutely correct but that also means I secured my members and yet again accessed those private or protected members,this is why I find it very confusing.