在下列的程序的横线处填上适当的语句,使该程序的输出为12。
#include<iostream>
using namespace std;
class TestClass
public:
int a,b;
TestClass(int i,int j)
a=i;
b=j;
;
class TestClass1:public TestClass
int a;
public:
TestClass1(int x):TestClass(x,x+1)
void show( )
______;//输出基类数据成员a的值
cout<<b<<endl;
;
int main( )
TestClass1 d(1);
d.show( );
return 0;
题库:计算机等级考试
类型:填空题
时间:2017-07-03 15:13:16
免费下载:《填空》Word试卷
在下列的程序的横线处填上适当的语句,使该程序的输出为12。
#include<iostream>
using namespace std;
class TestClass
public:
int a,b;
TestClass(int i,int j)
a=i;
b=j;
;
class TestClass1:public TestClass
int a;
public:
TestClass1(int x):TestClass(x,x+1)
void show( )
______;//输出基类数据成员a的值
cout<<b<<endl;
;
int main( )
TestClass1 d(1);
d.show( );
return 0;
本题关键词:当场处罚程序,程序,处方销毁程序,应急处置程序,X线检查程序,质量事故处理程序,工程施工程序,复苏程序,工作程序,建设程序;