填空题

请定义一个函数名为A,返回值为int,没有参数的纯虚函数的定义是【 】。

【参考答案】

virtual int A( )=0;
<上一题 目录 下一题>
热门 试题

填空题
以下程序的输出结果是【 】。#include<iostream.h>voidfun( ){ staticinta=0;a+=2;cout<<a<< ;}voidmain( ){ intcc;for(cc=1;cc<4;cc++)fun( );cout<<endl;}
填空题
以下程序的结果为【 】。#include”iostream.h”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);return 0;cout < < end1;=
相关试题
  • 以下程序的输出结果是 _________...
  • 以下程序的输出结果是【 】。#include<i...
  • 在C++语言中,访问一个对象的成员所用的...
  • 在C++语言中每个类都有一个【 】指针,...