C++提问:编一程序,将两个字符串连接起来,结果取代第一个字符串。要求用string类来实现

2025-02-25 06:25:11
推荐回答(2个)
回答1:

string str("hello");
string str2("world");
str += str2;

回答2:

不是吧?C++那本书上就有的啊