diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-08-01 23:44:04 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-08-01 23:44:04 +0300 |
commit | 4e9132b983c771d3e70d5a6b8bcdfdb1fead81fa (patch) | |
tree | 9f5e195a6c8600f065a057004670c00cfa5abee1 /Advent-of-Code-2021/AOC-16/main.c | |
parent | 1d96c68c66ba5648d1dd4d8ff2976fc97eea8a14 (diff) |
some more
Diffstat (limited to 'Advent-of-Code-2021/AOC-16/main.c')
-rw-r--r-- | Advent-of-Code-2021/AOC-16/main.c | 25 |
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; +} |