65,210
社区成员
发帖
与我相关
我的任务
分享
1、 size=strlen(rhs.c_str())+1;
str=new char [size];
strcpy(str, rhs.cstr());
2、char* tmp;
tmp = str;
size += strlen(s);
str = new char[size + 1]
strcpy(str, tmp);
strcat(str, s);
delete[] tmp;