64,651
社区成员
发帖
与我相关
我的任务
分享
#include<string>
#include <iostream>
using namespace std;
int main()
{
string str1 = "A";
str1[0] = 'a';
cout << str1 << endl;
string str2 = "";
cout << strlen(str2.c_str()) << endl;
str2 += 'b';
cout << str2 << endl;
return 0;
}