皮皮学,免费搜题
登录
搜题
【简答题】
使用VC++6.0打开考生文件夹下的源程序文件3.cpp。类People包括姓名和年龄两个字段。函数fun获得年龄比较大的人的姓名,然后输出这个姓名到屏幕。 其中定义的类并不完整,按要求完成下列操作,将类的定义补充完整。 (1)完成类的构造函数功能,请在注释1后添加适当的语句。 (2)完成构造函数对姓名的赋值,请在注释2后添加适当的语句。 (3)定义类的函数fun,请在注释3后添加适当的语句。 (4)补充函数fun的年龄比较功能,请在注释4后添加适当的语句。 注意:增加或者修改代码的位置已经用符号表示出来,请不要修改其他的程序代码。 试题程序: include classPeople { public: //********1******** { inti; for(i=0;sUserName[i]!=0;i++) {m_UserName[i]=sUserName[i]; } //********2******** m_Old=nOld; } private: charm_UserName[32]; intm_Old; //********3******** }; voidfun(char*s,People&personl,People&person2 { //********4******** if { for(inti=0;personl.m_UserName[i]!=0;i+ +) { s[i]=personl.m_UserName[i]; s[i+1]=0; } } else { for(inti=0;person2.m_UserName[i]!=0;i+ +) {s[i]=person2.m_UserName[i]; s[i+1]=0; } } } voidmain { chars[32]; Peoplepl('abc',20); Peoplep2('def',30): fun(S,p1,p2); cout$amp;
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【简答题】According to the race rules, dogs for race must have ______.
【单选题】The underlined word‘‘leg’’ in 'Bicycle tour and race' probably means [
A.
] race [
B.
] practice [ C] part of the training [ D] part of the tour
【单选题】细石混凝土地面是在结构层上浇捣c20细石混凝土()。
A.
10-20mm
B.
20-40mm
C.
40-60mm
D.
80-100mm
【单选题】比利时新艺术运动最富代表性的人物 。
A.
吉马德
B.
霍尔塔
C.
高迪
D.
穆特修斯
【单选题】During recent years we have heard much about 'race': how this race does certain things and that race believes certain things and so on. Yet, the【C1】______ phenomenon of race consists of a few surface ...
A.
complete
B.
full
C.
total
D.
whole
【单选题】During recent years we have heard much about 'race': how this race does certain things and that race believes certain things and so on. Yet, the 【21】______ phenomenon of race consists of a few surface...
A.
complete
B.
full
C.
total
D.
whole
【简答题】比利时新艺术运动最富代表性的人物() 。
【简答题】通过结晶,溶液中大部分的杂质会留在母液中,再通过过滤、 ,可以得到纯度较高的晶体
【单选题】比利时新艺术运动最富代表性的人物 。
A.
霍尔塔
B.
高迪
C.
吉马德
D.
穆特修斯
【单选题】关于图a(续上题图) 中外径千分尺标注结构说法正确的是?
A.
结构1 抵消了因手温导致的握把长度变大
B.
结构2 通过其内置弹簧产生力使得被测工件与测砧相互紧贴
C.
结构4 实现了测量轴的快速调节以及通过棘轮对测量用力的限制
D.
结构5 用于1/100 mm 的读取
E.
结构5 用于调节主轴螺纹与母螺纹之间的间隙
相关题目: