C++: Inheritance |Protected Inheritance

Protected Inheritance

If inheritance type is protected

• Base class public elements become protected in derived class

• Base class protected elements become protected in derived class.

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