C++字符串拼接
坑
char* ,char*
char* str1 = "Hello";
char*str2 = "World";
//方式一
char str3[20];
strcpy(str3, str1);
strcat(str3, str2);
//方式二
//char str3[20];
sprintf(str3,"%s%s",str1,str2);
string,string
string str1= "Hello";
string str2 = "World";
string str3 =str1+str2;
char*, string
char* str1 = "Hello";
string str2 = "World";
string str3=str1;
str3=str3+str1;