5.2. Types of Inheritance (level) #

Created Saturday 26 February 2022

There are 3 kinds of inheritance here.

  1. Public inheritance
  2. Protected inheritance
  3. Private inheritance

The coding effects are already seen. And are:

1. Public Inheritance #

Why #

How #

What #

2. Protected Inheritance #

This is rare, and is virtually never used.

3. Private Inheritance #

Why #

How #

public Derived : Base { // no specifier means private inheritance
	...
};

What #

Private inheritance is not a type(is-a) inheritance, but a blunt implementation inheritance.