blob: 17c62235923d98253e3297dd864e6f2529b86e99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
/*
*
* 8.5
*
*
*/
int main (int argc, char **argv) {
if(argc < 2 || argc > 2) {
return 1;
}
std::ifstream file(argv[1]);
if(file.fail()) {
return 1;
}
std::vector<std::string> svec;
std::string tmp;
while(file >> tmp) {
svec.push_back(tmp);
}
for(auto a : svec) {
std::cout << a << "\n";
}
std::cout << std::ends;
return 0;
}
|