填空题
在下面横线上填上适当的语句,完成程序。 #include <iostream> using namespace std; class Base { int x; public: Base(int i){ x=i;} ~Base(){} }; class Derived : public Base { public: ______//完成类Derive构造函数的定义 }; int main() { Derived Obj; return 0; } 在横线处应填入的语句是______。
【参考答案】
Derived(int i):Base(i){}
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
纯虚函数的声明总是以______结束。
点击查看答案&解析
填空题
数组是有序数据的集合,数组中的每个元素具有相同的 。
点击查看答案
相关试题
下面程序的运行结果为 # include <ios...
对n个元素的序列进行冒泡排序时,最少的比...