int main()
{
string title="This is a test string";
string::iterator pos;
pos=remove(title.begin(),title.end(),' ');
title.erase(pos,title.end());
cout<<title<<endl;
}
本文共 236 字,大约阅读时间需要 1 分钟。
int main()
{
string title="This is a test string";
string::iterator pos;
pos=remove(title.begin(),title.end(),' ');
title.erase(pos,title.end());
cout<<title<<endl;
}
转载于:https://www.cnblogs.com/7cms-3xll/archive/2013/01/17/2864140.html