aoc-2020/turbo_main.c
Rick bfede03757
Modification architecture projet
Il faut maintenant utiliser le make.sh pour compiler le turbo_main avec
le jour voulu.
2020-12-13 14:41:38 +01:00

26 lines
452 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <stdio.h>
#define FILENAME "input"
void premPartie(FILE *ptr);
void deuxPartie(FILE *ptr);
int main()
{
FILE *ptr = fopen(FILENAME, "r");
if (ptr == NULL)
{
printf("Le fichier %s nexiste pas.\n", FILENAME);
return 1;
}
printf("Traitement de la première partie…\n");
premPartie(ptr);
fseek(ptr, 0, SEEK_SET);
printf("\nTraitement de la deuxième partie…\n");
deuxPartie(ptr);
fclose(ptr);
return 0;
}