string插入和删除
功能描述:
对string字符串进行插入和删除字符操作
函数原型:
#include <iostream>
using namespace std;
#include <cstring>//字符串 插入和删除
void test01() {string str = "hello";str.insert(1, "111");cout << "str = " << str << endl;str.erase(1, 3);cout << "str = " << str << endl;}int main() {test01();return 0;
}