C++: Inheritance|Private Inheritance

Private Inheritance

If inheritance type is private

• Base class public elements become private in derived class

• Base class protected elements become private in derived class.

• Base class private elements remain private in base class itself, they cannot be accessed directly from outside the class.