What is protected inheritance in Cpp?

All QuestionsCategory: Cpp LanguageWhat is protected inheritance in Cpp?
Chetan Shidling Staff asked 5 years ago

I need short information.

1 Answers
Best Answer
Chetan Shidling Staff answered 5 years ago

Protected Inheritance

Specified between two classes as:

  1. class chetan : protected shidling

Base class Private members

  1. manipulate through inherited member functions.
  2. not accessible directly.
  3. still inherited

Base class Protected members

  1. retain the protected feature in the derived class

Base class Public members

  1. becomes protected in the derived class

Friend function not inherited.