string的erase方法, 第一次见, 没什么好说的

来源:互联网 发布:预包装食品网络销售 编辑:程序博客网 时间:2024/05/29 09:38
#include <iostream>#include <string>using namespace std;int main(){string s = "abcdefg";s.erase(2, 1);cout << s << endl; // "abcdefg"return 0;}

1 0
原创粉丝点击