Does C++ support Multiple inheritance

By: Prof. Fazal Rehman Shamil

Question: Does C++ support Multiple inheritance?Multiple inheritance

Answer: Yes, C++ supports the concept of Multiple inheritance between the classes.

In the figure, the class A and class B are the parents of class C.

These concepts can be represented with a simple C++ program. So, let’s begin with the program.

Example of C++ supporting the Multiple inheritance

C++ program to print a hollow square or rectangle star pattern with the support of Multiple inheritance.

In this example, one is the parent of the class of child class. You can run the program as proof that C++ supports the Multiple inheritance.

In the following program Class one and two are the parent of class child.


Does C++ support Multiple inheritance

Prof. Fazal Rehman Shamil
Latest posts by Prof. Fazal Rehman Shamil (see all)