Commit 0016012904dce3626400ffebadc0fa35ab50106f

Authored by rsSimonin
1 parent 506c3ab8

creation main.c

Showing 1 changed file with 20 additions and 0 deletions   Show diff stats
main.c 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +#include <stdio.h>
  2 +#include <stdlib.h>
  3 +#include <stdbool.h>
  4 +#include <string.h>
  5 +#include "arbre.h"
  6 +
  7 +int main () {
  8 + FILE* fp = fopen("words-no-accents","r"); //amelioration entrée
  9 + if(fp == NULL){ return EXIT_FAILURE;} //File is not readable
  10 +
  11 + struct dico *mondico=malloc(sizeof(struct dico));
  12 + charger_arbre(fp,&mondico);
  13 + affiche_dico(mondico);
  14 +
  15 +
  16 + free_dico(mondico);
  17 + fclose(fp);
  18 + return 0;
  19 +}
  20 +
... ...