x

C++ Multilevel & Multiple inheritance

PREV     NEXT

C++ Multilevel & Multiple inheritance:



What is multilevel inheritance?

  • In C++, we can not only derive a class from the base class but you can also derive a class from the derived class.
  • Mulitlevel inheritance is one child class inheriting from another child class. This is known as multilevel inheritance.

Let us have a look at the example for C++ Multilevel & Multiple inheritance:

What is multiple inheritance?

  • The multiple inheritance is a feature of C++ where a class can inherit from more than one class i.e. one sub class is inherited from more than one base class.
  • In this type of inheritance a single child class can have multiple parent classes.

Let us have a look at the example:



Like it? Please Spread the word!