64,683
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void)
{
wchar_t strTmp[1024];
vector<wstring> vecStr;
wcin.imbue(locale("chs"));
wcout.imbue(locale("chs"));
while( wcin >> strTmp )
{
wstring tmp = strTmp;
if( tmp == L"end" )
break;
if( tmp.find(L"厂") != wstring::npos )
{
tmp.erase();
}
vecStr.push_back(tmp);
}
for( unsigned int i = 0; i < vecStr.size(); ++i )
{
wcout << vecStr[i] << endl;
}
return 0;
}
输入
工厂
驼背А
测试