From 6d33273f62fb78c481babeda6317d0138974ff02 Mon Sep 17 00:00:00 2001 From: Oskar Date: Sat, 5 Oct 2024 16:01:36 +0200 Subject: more --- 8p5.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 8p5.cpp (limited to '8p5.cpp') diff --git a/8p5.cpp b/8p5.cpp new file mode 100644 index 0000000..17c6223 --- /dev/null +++ b/8p5.cpp @@ -0,0 +1,36 @@ +#include +#include +#include +#include + +/* + * + * 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 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; +} -- cgit v1.2.3