填空题

C++中,设置虚基类的目的是 【11】 。

【参考答案】

解决二义性问题
<上一题 目录 下一题>
热门 试题

填空题
下列程序的输出结果是 【14】 #include<iOStream>using namespace std;template <typename T>T total (T*datA) {T s=0;while(*datA) {s+=*data++;}return s;}int main(){int x[]={2,4,6,8,0,12,14,16,18};cout<<total(x)<<end1;return 0;}
填空题
若有以下程序:#include<iostream>using namespace std;class Base{public:void who(){cout<< Base <<end1;}} class Derived1:public Base{public:void who(){cout<< Derived <<end1;}};int main(){Base *p;Derived1 obj1;p=&obj1;p—>who();return 0;}则该程序运行后的输出结果是 【9】
相关试题
  • 下面程序的输出结果为:Base::fun,请将...
  • 下面程序的输出结果是 【15】 。#incl...
  • 下列程序的输出结果是 【8】 #include...