diff options
author | Oskar <[email protected]> | 2024-10-05 16:01:36 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-10-05 16:01:36 +0200 |
commit | 6d33273f62fb78c481babeda6317d0138974ff02 (patch) | |
tree | 7e70ab616485b1ed5bfdc1621f50c498e28d2d13 /8p4.cpp | |
parent | d5fcdab87a013b2c919b66ea9a52b469620ca49f (diff) |
more
Diffstat (limited to '8p4.cpp')
-rw-r--r-- | 8p4.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -0,0 +1,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; +} |