A friend class allows a class to access the private and protected members of another class. For example, an employer class is declared as a friend of an employee class so its member functions can access the employee class's non-public data members. Friendship is not symmetric or transitive - if class A is a friend of class B, class B is not necessarily a friend of class A, and classes A and C are not friends just because A is a friend of B and B is a friend of C.