Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sortline.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include <fstream>
3
#include <string>
4
#include <set>
5
6
typedef
std::set<std::string>
StrSet
;
7
8
int
main
()
9
{
10
StrSet
ss;
11
std::string line;
12
while
(std::getline(std::cin, line)) {
13
if
(!line.empty() && line[line.size() - 1] ==
'\n'
) {
14
line.resize(line.size() - 1);
15
}
16
if
(!line.empty()) {
17
ss.insert(line);
18
}
19
}
20
for
(StrSet::const_iterator i = ss.begin(), ie = ss.end(); i != ie; ++i) {
21
std::cout << *i << std::endl;
22
}
23
}
StrSet
std::set< std::string > StrSet
Definition
sortline.cpp:6
main
int main()
Definition
sortline.cpp:8
libraries
fc
libraries
ff
depends
xbyak
gen
sortline.cpp
Generated by
1.12.0