#include<iostream>

#include<string>

using namespace std;

int main(){

         string str("abcde");                   //字符串初始化

        

         str[1]='a';                            //用str[]修改单个字符

         cout<<str<<endl;                       

        

         str.at(1)='c';                         //用str.at()修改单个字符

         cout<<str<<endl;

        

         system("pause");

         return 0;

}