C++ 字符串连接:不使用 strcat 函数 日期: 2025-11-29 标签: 常规 #include using namespace std; int main() { string s1, s2; cin >> s1 >> s2; for (int i = 0; i < s2.length(); i++) { s1 += s2[i]; } cout << s1 << endl; return 0; } 原文地址: https://www.cveoy.top/t/topic/nhMZ 著作权归作者所有。请勿转载和采集! 免费AI点我,无需注册和登录