首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列模板声明中,有语法错误的是( )。
下列模板声明中,有语法错误的是( )。
admin
2020-07-30
20
问题
下列模板声明中,有语法错误的是( )。
选项
A、template
T fun(T x){retum x;}
B、template
T fun(T X,int n){return x木n;)
C、template
T fun(T*P){return*p;}
D、template
T classA{T n;};
答案
D
解析
第四个选项是定义类模板的,但是class前面的T是多余的。对于第二个选项,同一个类的对象相乘还是同一个类的对象,但是可能要考虑溢出的问题。
转载请注明原文地址:https://kaotiyun.com/show/cUyp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
若有下面的函数调用:fun(a+b,3,max(n-1,b))则fun的实参个数是()。
有如下程序段:inti=100;while(inti=10){cout
有如下类定义:classBase{public:inta;protected:intb;private:intc;};classDerived:
在一个程序文件中有如下语句:externintvar;关于这个语句,下列表述中错误的是
下列关于线性表的叙述中,不正确的是()。
关于new运算符的下列描述中,错误的是()。
下面叙述错误的是()。
定义如下枚举类型:enum{Monday,Tuesday,Wednesday,Thrusday,Friday=2};表达式Wednesday==Friday的值是()。
一棵二叉树共有25个结点,其中5个是叶子结点,则度为1的结点数为()。
下列关于软件工程的描述中正确的是()。
随机试题
黄茶最重要最具有标志性的工序是杀青
艺术的功能包括()
女性,33岁,急性阑尾炎、妊高征急诊输液治疗。患者出现头痛,血压160/105mmHg,予以硫酸镁解痉治疗,患者腱反射消失,呼吸10次/分。若患者症状无缓解可以
关于肝炎病毒,下列说法错误的是
能将上颌骨、下颌骨、颞颌关节及全口牙齿同时显示,为牙科病、牙齿矫形及牙槽骨、颞颌关节的骨折骨病提供重要信息的是
用UV光谱鉴定黄酮类化合物的结构时,常用的诊断试剂不包括
下列关于利用人际关系法开拓客源的说法不正确的是()。
健康的四大基石不包括下列哪项?()
【2015年河南新乡.单选】国家鼓励开展教育对外交流与合作。教育对外交流与合作坚持()的原则,不得违反中国法律,不得损害国家主权、安全和社会公共利益。
ItisnotoftenrealizedthatwomenheldahighplaceinsouthernEuropeansocietiesinthe10thand11thcenturies.Asawife,
最新回复
(
0
)