What is friend class in C++?
Page 1 of 1
What is friend class in C++?
When a class declares another class as its friend, it is giving complete access to all its data and methods including private and protected data and methods to the friend class member methods. Friendship is one way only, which means if A declares B as its friend it does NOT mean that A can access private data of B. It only means that B can access all data of A.
Similar topics
» What are friend classes? What are advantages of using friend classes?
» What are the advantages of using friend classes?
» What is class using C++?
» What is a Wrapper class?
» Class vs. Structure
» What are the advantages of using friend classes?
» What is class using C++?
» What is a Wrapper class?
» Class vs. Structure
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum