// 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;
	
}*/

  

相关文章:

  • 2022-03-10
  • 2022-01-17
  • 2022-03-10
  • 2021-05-30
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
猜你喜欢
  • 2021-05-28
  • 2021-12-20
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2021-10-18
  • 2021-06-14
相关资源
相似解决方案