Blame view

main.c 458 Bytes
a89bb625   bjeanlou   Update 8 withHash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  #include "dico.h"
  
  
  
  
  int main(int argc, char* argv[]){
    if(argc<2){
      printf("not enough arguments\n");
      return EXIT_FAILURE;
    }
    FILE*f=fopen(argv[1],"r");
    if(f==NULL){
      printf("wrong arguments\n");
      return EXIT_FAILURE;
    }
    
08822d77   bjeanlou   Update 9 withHash
17
    printf("bienvenue dans le dictonnaire\n\n");
a89bb625   bjeanlou   Update 8 withHash
18
19
20
21
22
    dico monDico;
    make_empty_dico(monDico);
    loadfrom_file(monDico,f);
    printto_terminal(monDico);
    delete_dico(monDico);
08822d77   bjeanlou   Update 9 withHash
23
    fclose(f);
a89bb625   bjeanlou   Update 8 withHash
24
    return EXIT_SUCCESS;
8c671959   bjeanlou   No more seg fault
25
  }