 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can use multiple inheritance in C++. Before starting, you can note my information. You can follow my YouTube channel that is Sanjay Gupta underscore tax school. You can download my Android app based on programming languages, which is available on Google Play. Now, coming on to the topic. First, I have included a header file i.e. iostream. Then namespace std is used. Then I have implemented first class i.e. publication. It has two attributes id and name. Then in public section, first function is v, which is having seen and see out statements. So see out is displaying first enter id. Then through see in id will be received from user. Then see out will display enter name, message on console and then seen will read that name. Second function is print, which will display id and name, message on console. So this is the complete implementation of publication class. Then second class is sales, which is having a protected member that is in sale. Why this is protected? Because I will be using this member in its derived class. So sales class will become base class and its derived class will be accessing sale variable. Then in public section, see out message is displaying enter sale message on console and seen will receive entered value inside sale variable. This is the print function definition. Then I have implemented. Sorry, this is the read function definition and then I have implemented print function, which will display value of sale variable on console. Here sales class is terminated after that third class is implemented. Implemented that is book. It is inheriting two classes. First one is publication. Second one is sales. It is having one attribute that is price. Then in public section, read function is implemented. This is calling read functions of publication and sales class. In this program, all three classes are containing read function and print function. So whenever you are calling read function or any other function of base class in functions of derived class, then you have to mention name of the class with scope registration operator. So here you can see that this read function is of publication class. Then second read function is of sales class and then price is received for this book class. So through this way, we can link calling of the functions of base class with functions of derived class. Similarly in print function, print function of publication and sales are called and then price is printed using see out statement in print function of derived class. Then calculate function is implemented, which will display multiplication of sale and price on console as total amount. So in this program, publication class is reading ID and name related to a publication. Sales class is receiving total number of sales and book class is receiving price. Then finally ID, name, total sale, price and total amount will be displayed on console. So all these functions are called in main. I have created object of book class that is B. It is calling read function, print function and calculate function of book class. Book class functions are internally linked with publication and sales class. So all the functions will be executed together. Now I am going to execute this code. You can see it is asking for ID. I am entering 11. It is asking for name. Suppose I am entering NK. It is asking for sale. I am entering 100. It is asking for price. I am entering 200. Now you can see the output. ID is 11. That is publication house ID. Then name of publication house sale. 100 books price 200 per book. Total amount is 20,000. So this way I have implemented multiple inheritance in C++ multiple inheritance means inheritance inheritance of more than one base classes into a single derived class. So this way I have implemented this code. I hope you have understood whatever I have explained in this video. 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 based on programming that is tech MS available on Google Play. Thank you for watching this video.