summaryrefslogtreecommitdiff
path: root/8p4.cpp
blob: 68a4355885fb2862bdb6bcf939978739652a5434 (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 <vector>
#include <string>

/*
 *
 * 8.4
 *
 *
 */

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> fvec;
	std::string tmp;
	while(std::getline(file, tmp)) {
		fvec.push_back(tmp);
	}

	for(auto a : fvec) {
		std::cout << a << "\n";
	}

	std::cout << std::ends;
	return 0;
}