It is a non-member function that can access the private members of the class to which it is
declared as friend.

According to OOP concept of data hiding or data encapsulation, no outside function can
access the private data in a class. Since friend function is a clear violation of this concept. It is
rarely used, so as to reduce data security ricks.

Share with : Share on Linkedin Share on Twitter Share on WhatsApp Share on Facebook