Skip to content
Related Articles

Related Articles

Improve Article

What all is inherited from parent class in C++?

  • Difficulty Level : Easy
  • Last Updated : 15 Jul, 2021

Following are the things that a derived class inherits from its parent. 
1) Every data member that is defined in the parent class (although such members may not always be accessible in the derived class!).
2) Every ordinary member function of the parent class (although such members may not always be accessible in the derived class!).
3) The same initial data layout as of the base class. 

Following are the properties which a derived class doesn’t inherit from its parent class : 
1) The base class’s constructors and destructor. 
2) The base class’s friend functions.
3) Overloaded operators of the base class.

 

Attention reader! Don’t stop learning now. Participate in the Scholorship Test for First-Step-to-DSA Course for Class 9 to 12 students.

My Personal Notes arrow_drop_up
Recommended Articles
Page :