#include class A { public: int n; }; class B:virtual public A {}; class C:virtual publ#include class A{ public: int n;};class B:virtual public A {};class C:virtual public A {};class D:public B ,public C{ int getn(){return B::n;}};D d;d.B::n=10;d.C::
#include class A { public: int n; }; class B:virtual public A {}; class C:virtual publ#include class A{ public: int n;};class B:virtual public A {};class C:virtual public A {};class D:public B ,public C{ int getn(){return B::n;}};D d;d.B::n=10;d.C::
#include class A { public: int n; }; class B:virtual public A {}; class C:virtual publ
#include
class A
{
public:
int n;
};
class B:virtual public A {};
class C:virtual public A {};
class D:public B ,public C
{
int getn(){return B::n;}
};
D d;
d.B::n=10;
d.C::n=20;
cout
#include class A { public: int n; }; class B:virtual public A {}; class C:virtual publ#include class A{ public: int n;};class B:virtual public A {};class C:virtual public A {};class D:public B ,public C{ int getn(){return B::n;}};D d;d.B::n=10;d.C::
不晓得楼主问题是什么,但是根据我的猜测应该是帮你调试程序吧.
#include
using namespace std;
class A
{
public:
int n;
};
class B:virtual public A {};
class C:virtual public A {};
class D:public B ,public C
{
int getn(){return B::n;};
};
int main()
{
D d;
d.B::n=10;
d.C::n=20;
cout