c++实现:编程实现两字符串的连接。要求使用string类定义字符串对象。
#include
using namespace std;
int main() { string str1 = "Hello"; string str2 = "world!";
string str3 = str1 + " " + str2;
cout << str3 << endl;
return 0;
}
原文地址: https://www.cveoy.top/t/topic/8fA 著作权归作者所有。请勿转载和采集!