27 lines
457 B
C
27 lines
457 B
C
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
// Get filename as an argument, defaults to "input.txt"
|
|
char *path = (argc > 1) ? argv[1] : "input.txt";
|
|
|
|
if (!path)
|
|
{
|
|
printf("Requires input file.\n");
|
|
return 1;
|
|
}
|
|
|
|
FILE *file = fopen(path, "r");
|
|
|
|
if (!file)
|
|
{
|
|
printf("Could not find file.");
|
|
return 1;
|
|
}
|
|
|
|
// Code goes here
|
|
|
|
return 0;
|
|
} |