What is private, public and protected inheritance?

What is private, public and protected Inheritance?

Private Inheritance :
The Public and protected members of Base class become private members of the derived class.

Public Inheritance :
All the public members and protected members are inherited as public and protected respectively.

Protected Inheritance :
Public and Protected members are derived as protected members.

Explain the private, protected and public inheritance.

Private Inheritance : All the public and protected members in base become private.
Protected Inheritance : All the public and protected members in base class become protected.
Public Inheritance : In case of public inheritance, public remains public and protected remains protected..
Describe abstract base class - C++
Describe abstract base class - A pure virtual function is a function which does not have definition of its own..
What is matrix class? Describe it with example and uses - C++
What is matrix class? Describe it with example and uses - A matrix is simply a 2-D array, which is widely used in scientific programming to perform calculations.....
What are the characteristics of friend functions? - C++
What are the characteristics of friend functions? - A friend function is not in the scope of the class n which it has been declared as friend....
Post your comment
Discussion Board
c++
Very helpful and appreciative...Thanks..
sonal bandal 12-26-2017