summaryrefslogtreecommitdiff
path: root/Advent-of-Code-2021/AOC-16/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'Advent-of-Code-2021/AOC-16/main.c')
-rw-r--r--Advent-of-Code-2021/AOC-16/main.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/Advent-of-Code-2021/AOC-16/main.c b/Advent-of-Code-2021/AOC-16/main.c
new file mode 100644
index 0000000..baa6501
--- /dev/null
+++ b/Advent-of-Code-2021/AOC-16/main.c
@@ -0,0 +1,25 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#if 1
+ #define FILE_PATH "example.txt"
+#else
+ #define FILE_PATH "input.txt"
+#endif
+
+void parse()
+{
+ FILE *fp = fopen(FILE_PATH, "r");
+ if(!fp) {
+ fprintf(stderr, "ERROR: Could not open file: %s\n", FILE_PATH);
+ exit(EXIT_FAILURE);
+ }
+
+ fclose(fp);
+}
+
+int main(void)
+{
+ parse();
+ return 0;
+}