CS Electrical And Electronics
@cselectricalandelectronics

What is public inheritance in Cpp?

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

I need short information.

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