summaryrefslogtreecommitdiffstats
path: root/2023-2/L0/main.cpp
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2023-08-18 01:54:52 -0500
committerMitsuo Tokumori <[email protected]>2023-08-18 01:54:52 -0500
commitd6e56dbe184cac37d7aa5cebe3e1db108dee4a28 (patch)
tree6729cdc1f629cfe011d63375f462c8646c34ffaf /2023-2/L0/main.cpp
parent8e01ba134a230e47e8b80351dd8abc8c3b72e683 (diff)
downloadLP1-d6e56dbe184cac37d7aa5cebe3e1db108dee4a28.tar.gz
LP1-d6e56dbe184cac37d7aa5cebe3e1db108dee4a28.tar.bz2
LP1-d6e56dbe184cac37d7aa5cebe3e1db108dee4a28.zip
Add 2023-2 L0 example for guided lab
Diffstat (limited to '2023-2/L0/main.cpp')
-rw-r--r--2023-2/L0/main.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/2023-2/L0/main.cpp b/2023-2/L0/main.cpp
new file mode 100644
index 0000000..fc150df
--- /dev/null
+++ b/2023-2/L0/main.cpp
@@ -0,0 +1,21 @@
+// Just an example of I/O with files for INF281
+// Compile with: clang++ -g main.cpp fun.cpp && ./a.out
+// Mitsuo 2023-08-17
+
+#include <iostream>
+#include <fstream> // archivos
+
+#include "fun.h"
+
+using namespace std;
+
+int main(int argc, char ** argv) {
+ ifstream in("Libros.csv");
+ if (!in) {
+ cerr << "Error: No se pudo abrir archivo\n";
+ }
+ ofstream out("reporte.txt");
+ leer_datos_escribir_reporte(in, out);
+ return 0;
+}
+