// 9 string类的erase成员函数的使用 /* #include <iostream> #include <string> using namespace std; int main() { string s = "give me"; cout<<"原始字符串为:"<<s<<endl; s.erase(1,3); //炎1开始删除三个字符 cout<<"原始字符串为:"<<s<<endl; s.erase(2); //删除二个字符,从后面开始的样 cout<<"原始字符串为:"<<s<<endl; s.erase();//删除所有 cout<<"原始字符串为:"<<s<<endl; return 0; }*/