#include"iostream.h"
class Base1
{
protected:
int iVar1;
public:
void show_1()
{
cout<<iVar1<<endl;
}
};
class Base2
{
protected:
int iVar2;
public:
void show_2()
{
cout<<iVar2<<endl;
}
};
class Derived:public Base1,public Base2
{
public:
void set(int ix,int iy)
{
iVar1=ix;
iVar2=iy;
}
};
void main()
{
Derived dVar;
dVar.set(19,30);
dVar.show_1();
dVar.show_2();
}
class Base1
{
protected:
int iVar1;
public:
void show_1()
{
cout<<iVar1<<endl;
}
};
class Base2
{
protected:
int iVar2;
public:
void show_2()
{
cout<<iVar2<<endl;
}
};
class Derived:public Base1,public Base2
{
public:
void set(int ix,int iy)
{
iVar1=ix;
iVar2=iy;
}
};
void main()
{
Derived dVar;
dVar.set(19,30);
dVar.show_1();
dVar.show_2();
}