main.c 538 Bytes
#include "dico.h"




int main(int argc, char* argv[]){
  if(argc<2){
    printf("not enough arguments\n");
    return EXIT_FAILURE;
  }
  FILE*fileIn=fopen(argv[1],"r");
  if(fileIn==NULL){
    printf("wrong arguments\n");
    return EXIT_FAILURE;
  }
  FILE*fileOut=fopen("out.txt","w");
  
  printf("bienvenue dans le dictonnaire\n\n");
  dico monDico;
  make_empty_dico(monDico);
  loadfrom_file(monDico,fileIn);
  printto_file(monDico,stdout);
  delete_dico(monDico);
  fclose(fileIn);
  fclose(fileOut);

  return EXIT_SUCCESS;
}