填空题
如果一个函数模板声明列出了多个参数,则每个参数之间必须使用逗号隔开,每个参数都必须重复使用关键词 【12】 。
【参考答案】
class
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
有如下程序: #include <iostream> using namespace std; class shapes protected: int x,y; public: void setvalue(int d, int w=0) x=d; y=w; virtual void disp()=0; ; class square : public shapes public: void disp() cout<<x*y<<end1; ; int main() shapes *ptr; square s1; ptr=&s1; ptr->setvalue(10,5); ptr->disp(); return 0; 执行上面的程序将输出 【14】 。
点击查看答案&解析
填空题
有以下程序: #include <iostream> #include <fstream> using namespace std; int main() fstream file; file.open( abc.txt , ios_base::in); if (! file ) cout<< Can not open abc.txt <<end1; abort(); char ch; int i = 0; while ( ! file.eof() ) file.get(ch); i++; cout<< Characters : <<i<<end1; file.close(); return 0; 程序实现的功能是 【15】 。
点击查看答案&解析
相关试题
下面程序的运行结果为 【13】 。 #in...