# include<iostream>
using namespace std;
class A
{
public:
void f()
{
cout<<"aaa"<<endl;
}
};
class B:virtual public A
{
public:
void f()
{
cout<<"bbbb"<<endl;
}
};
class C:public B
{
};
class D:virtual public A,public C
{
public:
void g()
{
f();
}
};
int main()
{
D d;
d.f();
return 0;
} 它的值为啥是bbbb而不是aaa,求解答?