What is private inheritance in Cpp?

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

I need short information.

1 Answers
Chetan Shidling Staff answered 5 years ago

Private Inheritance

Specified between two classes as:

  1. class electrical :  private electronics
  2. class electrical : electronics

Base class Private members

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

Base class Protected and Public members

  1. becomes private in the derived class

Friend functions not inherited