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..
|