Blame view

main.c 435 Bytes
00160129   rsSimonin   creation main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  #include <stdio.h>
  #include <stdlib.h>
  #include <stdbool.h>
  #include <string.h>
  #include "arbre.h"
  
  int main () {
      FILE* fp = fopen("words-no-accents","r"); //amelioration entrée
  	if(fp == NULL){ return EXIT_FAILURE;} //File is not readable
  	
      struct dico *mondico=malloc(sizeof(struct dico));
      charger_arbre(fp,&mondico);
      affiche_dico(mondico);
      
      
      free_dico(mondico);
      fclose(fp);    
      return 0;
  }