填空题

虚函数必须是类的______。

【参考答案】

成员函数
<上一题 目录 下一题>
热门 试题

填空题
下面程序的运行结果是______。#include<iostream>using namespace std;class count{static int n;public:count(){n++;}static int test(){for(int i=0;i<4;i++)n++;return n;}};int count::n=0;int main(){cout<<count:: test()<< ;count c1, c2;cout<<count :: test()<<endl;return 0;}
填空题
多态性分为两类:编译时的多态性和______。
相关试题
  • 有以下程序:#include<iostream>using ...
  • 下面程序的执行结果是______。#incl...
  • Staff类含有血型数据成员ID,两个Staff对象...
  • 下列程序的输出结果是______。#incl...
  • 下列程序的输出结果是______。#incl...