Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Write a C++ Program using concept of multiple Inheritance.
SUBMITTED BY:
Nrupeshsinh
DATE:
June 30, 2016, 2:29 p.m.
FORMAT:
Text only
SIZE:
448 Bytes
Raw
Download
Tweet
HITS:
352
Go to comments
Report
# include<iostream.h>
# include<conio.h>
class A
{
public:
int a;
void show()
{
cout<<"Enter value of A=";
cin>>a;
}
};
class B
{
public:
int b;
void show1()
{
cout<<"Enter value of B=";
cin>>b;
}
};
class C : public A,public B
{
public:
void display()
{
cout<<"Sum="<<a+b;
}
};
void main()
{
clrscr();
C obj;
obj.show();
obj.show1();
obj.display();
getch();
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus