#include
using namespace std;
class A{
public:
void test(){ cout<< "TestA"<<endl;}
};
class B:public A{
public:
void test(){ cout<< "TestB"<<endl;}
};
class C:public A{
public:
void test(){ cout<< "TestC"<<endl;}
};
class D: public B, public C{
public:
void test(){ cout<< "TestD"<<endl;}
};
int main(){
D qwe;
qwe.C::A::test();//这个地方DEVC++提示我A不明确,语法过不了
return 0;
}
请问一下怎么才能输出TESTA。
using namespace std;
class A{
public:
void test(){ cout<< "TestA"<<endl;}
};
class B:public A{
public:
void test(){ cout<< "TestB"<<endl;}
};
class C:public A{
public:
void test(){ cout<< "TestC"<<endl;}
};
class D: public B, public C{
public:
void test(){ cout<< "TestD"<<endl;}
};
int main(){
D qwe;
qwe.C::A::test();//这个地方DEVC++提示我A不明确,语法过不了
return 0;
}
请问一下怎么才能输出TESTA。