Dev Dives: Streamline document processing with UiPath Studio Web
Multiple inheritance in c++
1.
2. Out lines of presentation
What is inheritance?
What is multiple inheritance?
It’s application in our practical life.
Example of multiple inheritace.
Summary .
3. Inheritance:
In object oriented programming , inheritance is when
an object or class is based on another object or class
,using the same implementation.
There are some types of inheritance given below:
1. single inheritance
2.multiple inheritance
3.multilevel inheritance
4.hierarchical inheritance
5.hybrid inheritance
4. Multiple inheritance:
Multiple inheritance is a feature of c++ where a class
can inherit from more than one classes. The
constructors of inherited classes are called in the same
order in which they are inherited. Here two or more
base class and one derived class.
5.
6. A simple program using multiple
inheritance:
#include<iostream>
using namespace std;
class info{
int id;
public:
void getid(){cin>>id; cout<<id<<endl;}
};
class result{
int mark;
public:
void getmark(){cin>>mark; cout <<mark<<endl;}
};
8. Application and importancey of
multiple inheritance:
When the situation is to need one or more base class
to get derived class then it’s applicable.
9. Summary:
Finally I wanted to mean you that what is inheritance
,classification,multiple inheritance,and its application
and how it works.I belived that acknowlegement of
this topics will be uses related sector in future.