 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can use default constructor in multiple inheritance in C++. Before starting, you can note my information. You can follow my YouTube channel that is sanjaygupta underscore tax school. You can download my app that is based on programming. Name of app is Tagimace which is available on Google Play. Now coming on to the topic. For demonstration purpose, I have implemented a code in front of which is available in front of you. Here you can see I have included a header file IO stream. Then a name space is used that is STD. In multiple inheritance, I have to implement more than one base classes and single derived class. So I have implemented base class A. Here default constructor is available, which will display a message constructor of class A. Then second class is B. Here default constructor of class B is defined. It will display constructor of class B message on console. I am only implementing a default constructor right now. I am not implemented any other function because I am just demonstrating you how you can use default constructor. Here in class C, I have inherited class A and class B. And then constructor of class C is defined here, which will display constructor of class C message on console. Here you can see both the classes are inherited. So here the order of inheritance decides which class is first base class and which is second. So here A is first base class and B is second base class. And C is derived class. So I have created object of C in main function. Now you have to notice that order of calling of constructor is derived to base class. Sorry, order of calling of constructor is derived to base class. So first derived class constructor is called, then control will be transferred to base class. And order of execution of constructor is base class to derived class. So first constructor of base class is executed and then constructor of derived class is executed. So here when this obj object is created, control will be transferred to C class constructor. Then it will transfer control to A and B. But first A will be executed and then B and then C because A is first base class. So first executing this code, you can see the output constructor of class A, constructor of class B and constructor of class C. These three messages are displayed on console. Now I am changing order of base class. This time first base class is B and second base class is A. Now see what happens when we execute this code. You can see the output. It has changed. Constructor of class B is printing first, constructor of class A is printing second and constructor of class C is printing third. So in case of multiple inheritance, you have to notice that in which order you are inheriting a particular class that makes order of base classes which are available in our program. So if multiple base classes are available, then order is important. But if you are inheriting only single base class, then order doesn't matter. So in case of multiple inheritance, you have to remember that. And another important thing is order of calling and order of execution of constructor which I have already explained to you. So this is all about how to use default constructor in multiple inheritance in C++. I hope you have understood this concept. If you want to watch more programming related videos, you can follow my YouTube channel that is Sanjay Gupta underscore tech school. You can download my app Techimage that is available on Google Play. Thank you for watching this video.