1 string teacher = "teach_"; 2 string name = "ab"; 3 teacher += name[0]; 4 cout << teacher << endl;
打印结果:
标签:ab,string,拼接,字符串,teacher,name From: https://www.cnblogs.com/Sandals-little/p/16878959.html
1 string teacher = "teach_"; 2 string name = "ab"; 3 teacher += name[0]; 4 cout << teacher << endl;
打印结果:
标签:ab,string,拼接,字符串,teacher,name From: https://www.cnblogs.com/Sandals-little/p/16878959.html