C++ Multiple Inheritance

  c++

Email

#include<iostream>

using namespace std;

class A{

public :

void data()
{

cout << “the values of the function”;
}
};

class B{

public :

void setname()
{
cout << “this coding bealgrloe”;
}
};

class C {

public :

void setnamess()
{
cout << “this coding bealgrloe”;
}
};

class D: public A, public B, public C
{

public :
void namesest()
{
cout << “this making “;
}

};

int main()
{
D naik;
naik.data();
naik.setname();
naik.namesest();
naik.setnamess();

}

Spread the Code

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of