![](https://lstatic.shangxueba.com/jiandati/pc/images/pc_jdt_tittleico.png)
We ask_______to provide information that will permit us to boost your site visit.A.youB.ou
We ask_______to provide information that will permit us to boost your site visit.
A.you
B.ourselves
C.us
D.yourself
![](https://lstatic.shangxueba.com/jiandati/pc/images/jdt_panel_vip.png)
We ask_______to provide information that will permit us to boost your site visit.
A.you
B.ourselves
C.us
D.yourself
All work and no play makes Jack a_____boy(prov)
A.clever
B.bright
C.intelligent
D.dull
East and west, home is_____(prov)
A.best
B.worst
C.nearest
D.farthest
A.College career offices
B.State Department of Labour offices
C.The local public library
D.All of the abov
That children can learn foreign languages better than adults is ______.
A.obvious
B.not proved
C.well known
D.correct
The need for exchange arose when ______.
A.men wanted things they themselves could not provide
B.men became independent of others
C.skilled people such as smiths, leather workers or carpenters sprang everywhere
D.people began to learn making tools
The interview is mainly to______.
A.compare the different facilities that hotel chains provide
B.compare some hotel chains in different aspects
C.introduce some hotel chains with workout offerings
D.introduce workout offerings provided in some hotel chains
Why can young men with apprenticeships earn more than those without?
A.Apprenticeships provided them with the chance of better character and skill.
B.Apprenticeships were valued much more than high academic qualifications.
C.They were more confident, optimistic and they were also more skillful.
D.Their non-apprentice contemporaries wasted much time in taking A-levels.
(1)补充类Employee的构造函数,请使用字符串函数将数据成员name,address,city,province和zipcode分别初始化为参数*nm,*addr,*city,*prov和*zip的值。请在注释“//**1**”之后添加适当的语句;
(2)完成类Employee的成员函数ChangeName(char * newName)的定义,将newName指向的内容赋值给数据成员name,请在注释“//**2**”之后添加适当的语句;
(3)完成类Employee的成员函数Display()的定义,先使用指针buffer动态申请一个char型的200单位大小的空间,然后使用字符串函数将数据成员name和address依次复制其中,最后返回该指针buffer,将请在注释“//**3**”之后添加适当的语句。输出结果如下:
王东建国路大街105号
注意:除在指定位置添加语句之外,请不要改动程序中的其他内容。
源程序文件test18_3.cpp清单如下:
include <iostream.h>
include <string.h>
class Employee{
protected:
char name[20];
char address[100];
char city[20];
char province[20];
char zipcode[10];
public:
Employee(char *nm, char *addr,char *city, char *prov, char *zip);
void ChangeName(char *newName);
char *Display();
};
Employee::Employee(char *nm, char *adr, char *cit, char *prov, char *zip)
{
//**1**
strcpy(city, cit);
strcpy(province,prov);
strcpy(zipcode,zip);
}
void Employee::ChangeName(char * newName)
{
//**2**
}
char *Employee::Display()
{
//**3**
strcat(buffer, address);
return buffer;
}
void main()
{
Employee emp("李华","建国路大街105号","石家庄","河北","103400");
emp. ChangeName ("王东");
cout<<emp.Display()<<end1;
}
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!