📄 chapter4-10.cpp
字号:
//文件名:CHAPTER4-10.cpp
#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void listWords(istream& in, ostream& out)
{
string s;
unsigned int size=0;
vector<string> v;
while (size<2){in >> s; v.push_back(s); size++;}
sort(v.begin(), v.end());
vector<string>::iterator e= unique(v.begin(), v.end());
for (vector<string>::iterator b = v.begin(); b != e; b++) { out << *b << endl; }
}
void main()
{ listWords(cin, cout);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -