C++ Multilevel & Multiple inheritance

1. Online Compilers - Compile & Run your C/C++ programs:

✅ Online Compilers

2. Ask your questions or clarify your/others doubts from,

✅ Online Discussion Forums by Fresh2Refresh.com





PREV     NEXT

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:

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:

1. Online Compilers - Compile & Run your C/C++ programs:

✅ Online Compilers

2. Ask your questions or clarify your/others doubts from,

✅ Online Discussion Forums by Fresh2Refresh.com






Share this website !!!
Facebook Twitter Linkedin