diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-12-04 18:37:07 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-12-04 18:37:07 +0100 |
| commit | e602cff985169e792ca2f5fe047c4cc8ab5ad040 (patch) | |
| tree | c9308b54b06a78fe9e530c291b7ec97926b0a72b /1/part2.c | |
| parent | 7465602d9b2f7b23976d0905249fd085f4364300 (diff) | |
Support benchmarking
Diffstat (limited to '1/part2.c')
| -rw-r--r-- | 1/part2.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -20,9 +20,12 @@ int repair(const int *arr) return 0; } -int main() +int main(int argc, char *argv[]) { - FILE *file = fopen("input", "r"); + FILE *file = fopen(argv[1], "r"); + if (!file) { + return 1; + } char buffer[8] = { 0 }; int input[INPUT_LEN] = { 0 }; |
