单项选择题
重载输入流运算符<<必须使用的原型为
A.ostream& operator>>(ostream&,<类名>);
B.istream&o perator>>(istream&,<类名>&);
C.ostream operator>>(ostream,<类名>&);
D.<类名>operator>>(istream&,<类名>&);
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下函数模板的定义: template<class T> T func(T x,T y){return x*x+y*y;} 在下列对func的调用中不正确的是
A.func(3,5);
B.func<>(3,5);
C.func(3,5.5);
D.func<int>(3,5.5);
点击查看答案&解析
单项选择题
下列对模板的声明中正确的是
A.template<T>
B.template<class T1,T2>
C.template<classT1,classT2>
D.template<classT1;classT2>
点击查看答案&解析
相关试题
下面是复数类complex的定义,其中作为友元...
若有以下程序:#include<iostream>using...
【13】 允许用户为类定义一种模式,使得...
在下面横线上填上适当的语句,完成程序。#...
虚函数必须是类的 【12】 。