1024.cpp
来自「学习C++ Primer中文版第四版时」· C++ 代码 · 共 23 行
CPP
23 行
#include <set>
#include <iostream>
#include <string>
using namespace std;
void main()
{
set<string> excluded;
excluded.insert("success");
excluded.insert("class");
string word;
while(cin>>word)
{
if(!excluded.count(word))word.resize(word.size()-1);
cout<<word<<endl;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?