summaryrefslogtreecommitdiff
path: root/8p4.cpp
diff options
context:
space:
mode:
Diffstat (limited to '8p4.cpp')
-rw-r--r--8p4.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/8p4.cpp b/8p4.cpp
new file mode 100644
index 0000000..68a4355
--- /dev/null
+++ b/8p4.cpp
@@ -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;
+}