单项选择题
重载输入流运算符>>必须使用的原型为
A) istream& operator>>(istream&,<类名>&);
B) istream& operator>>(istream,<类名>);
C) istream operator>>(istream,<类名>&);
D) <类名>operator>>(istream&,<类名>&);
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下程序: #include<iostream.h> class Base protected:int i; public:int j; ; class Derived:public Base int m; public:int n; ; int main() Derived d; d.i=0; [1] d.j=0; [2] d.m=0; [3] d.n=0; [4] return 0; 其中主函数中有两个赋值语句有错,这两个错误的赋值语句是( )。
A.[1]和[2]
B.[1)和[3]
C.[2]和[3]
D.[2]和[4]
点击查看答案
单项选择题
在下列原型所示的C++函数中,按“传值”方式传递参数的是( )。
A) void f1(int x);
B) void f2(int*x);
C) void f3(const int*x);
D) void f4(int&x);
点击查看答案&解析
相关试题
类模板的使用实际上是将类模板实例化成一个...
以下程序的输出结果是( )。 #include...
在数据库设计中,将E-R图转换为关系模式的...