填空题
请在如下程序中的空格处填写正确的语句;
#include<iostream>
using namespaee std;
c]ass Base
public:
void fun( )cout<<"Base fun"<<endl;
;
class Derived:public Base
public:
void fun( )
______//调用基类的函数fun( )
cout<<"Derived fun"<<endl;
;
【参考答案】
Base::fun( )
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
请将如下程序补充完整,使得输出结果为:bbaa。 #include<iostream> using naluespace std; class A public: ______eout<< aa ; ; class B:public A public: ~B( )eont<< bb ; ; int ulain( ) B*P=new B; delete P; return 0;
点击查看答案&解析
填空题
有以下复数类的声明,请补充完整。 Class complex double real; 实部 double imag; 虚部 public: complex(double x,double y) real=x: imag=y; complex operator+(complex e) 重载加法运算符“+” return complex(______) ;
点击查看答案&解析
相关试题
请将下列栈类Stack补充完整。 class Stac...