字符串操作
课程:C++ · 编程练习
C++编程练习 - 字符串操作
练习内容
#include <iostream>\n#include <string>\nusing namespace std;\n\nint main() {\n string text = "Hello C++";\n\n cout << "原字符串: " << text << endl;\n cout << "字符串长度: " << text.length() << endl;\n
课程:C++ · 编程练习
C++编程练习 - 字符串操作
#include <iostream>\n#include <string>\nusing namespace std;\n\nint main() {\n string text = "Hello C++";\n\n cout << "原字符串: " << text << endl;\n cout << "字符串长度: " << text.length() << endl;\n