首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
重载输入流运算符>>必须使用的原型为
重载输入流运算符>>必须使用的原型为
admin
2013-05-30
18
问题
重载输入流运算符>>必须使用的原型为
选项
A、ostream& operator>>(ostream&,<类名>);
B、istream& operator>>(istream&,<类名>&);
C、ostream operator>>(ostream,<类名>&);
D、<类名>operator>>(istream&,<类名>&);
答案
A
解析
本题考核运算符的重载。C++中重载输入流运算符>>和输出流运算符<<只能作为非类成员函数重载,且必须使用如下原形:istream& operator>> (istream&, <类名>&);ostream& operator<<(ostream&, <类名>);
转载请注明原文地址:https://kaotiyun.com/show/n9Np777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
对于下面程序,选项正确的是()。#include<iostream>usingnamespacestd;classpoint{public:voidsetpoint(un
下列数据结构中,按“先进后出”原则组织数据的是()。
当循环队列非空且队尾指针等于队头指针时,说明循环队列已满,不能进行人队运算。这种情况称为【】。
对基类数据成员的初始化必须派生类的构造函数中的【】处执行。
下列对于软件工程的基本原则描述中错误的是()。
下列关于动态联编的描述中,错误的是()。
在一个C++源程序文件中定义的全局变量的有效范围是()。
下面是一个栈类的模板,其中push函数将元素i压入栈顶,pop函数弹出栈顶元素。栈初始为空,top值为0,栈顶元素在stack[top-1]中,在下面横线处填上适当语句,完成栈类模板的定义。template<classT>classTstack
为了使模块尽可能独立,要求()。
实现输出为八进制的符号是()。
随机试题
再生障碍性贫血的诊断标准包括
Educationisnotanend,butameanstoanend.Inotherwords,wedonoteducatechildrenonlyforthepurposeofeducatingthe
既含有雄黄又含有蟾酥的中成药有
患者男,35岁,开胸术后行胸膜腔闭式引流。正常情况下,水封瓶内长管中的水柱波动范围应是
决策者决定是否参加某建设工程监理投标时,将影响其投标决策的主客观因素用某些具体指标表示出来。上述描绘的方法为()。
注册建造师采用弄虚作假等手段取得《注册建造师继续教育证书》的,一经发现,()。
影响个别资本成本率的高低的因素有()。
在实际测量中,信度值一般用描述两次测量结果一致性的()来估计。
当代商城年终特别奖的评定结果即将揭晓。该商城营业部的四位职工在对本部门职工的评定结果进行推测。张艳说:“如果营业部经理能评上,那么李霞也能评上。”李霞说:“我看我们营业部没人能评上。”王平说:“我看营业部经理评不上。”赵蓉说:“恕我直言,我看李霞评不上,
Readthearticlebelowaboutexportingandthequestions.Foreachquestion(13-18),markoneletter(A,B,CorD)onyourAnsw
最新回复
(
0
)