#include<iostream>
#include<stdlib.h>
using namespace std;
class human
{
public:
int func(){ return 1; }
};
class father :virtual public human
{
public:
int func1(){ return 2; }
};
class mother :virtual public human
{
public:
int func2(){ return 3; }
};
class son :public father, public mother
{
public:
int func3(){ return 4; }
};
int main()
{
son a;
cout << a.father::func() << endl;
cout << a.mother::func() << endl;
cout << a.human::func() << endl;
cout << a.func() << endl;
cout << a.func1() << endl;
cout << a.func2() << endl;
cout << a.func3() << endl;
father b;
cout << b.func() << endl;
cout << b.func1() << endl;
son*p = new son;
cout << p->func() << endl;
cout << p->func1() << endl;
cout << p->func2() << endl;
system("pause");
return 0;
}