在下面程序的横线处填上适当的语句,使程序执行后的输出结果为ABCD。 include using nam

14 查阅

在下面程序的横线处填上适当的语句,使程序执行后的输出结果为ABCD。

include<iostream>

using namespace std;

classA

{

public:

A(){cout<<'A';}

};

class B:______

{

public:

B(){cout<<'B';}

};

class C:______

{

public:C(){cout<<'C';}

};

class D:public B,public C

{

public:D(){cout<<'D';}

};

void main(){D obj;)

参考答案:

virtual A或virtual public A或virtual private A或virtual protected A与virtual A或virtual public A或virtual private A或virtual protected Avirtual A或virtual public A或virtual private A或virtual protected A与virtual A或virtual public A或virtual private A或virtual protecte

计算机二级