CS Electrical And Electronics
@cselectricalandelectronics

What is protected inheritance in Cpp?

All QuestionsCategory: Cpp LanguageWhat is protected inheritance in Cpp?
CS Electrical And Electronics Staff asked 4 years ago

I need short information.

1 Answers
Best Answer
CS Electrical And Electronics Staff answered 4 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.