What is public inheritance in Cpp?

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

I need short information.

1 Answers
Chetan Shidling Staff answered 5 years ago
  • Public Inheritance

 
Specified between two classes as:

  1. class alpha: public beta 

Base class private members

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

Base class public and protected members

  1. inherited with original member access

Friend function not inherited