1. The class also has a friend class, and a friend class can access the private data of the class, and the non-friend class cannot access the private data of the class, which implements the class package.
2. When a class is a friend of another class, the class is called a friend class. All member functions of the friend class are another class of friend functions, and they can access hidden information in another class (including private members and protect members). Friends can explain in another class of public sections or private parts, and the methods are as follows: Friend