good morning
As you see in my code source
I ceated the enum boolean
but the problem is when I want to scan "biblio[i].emprunter"
what should i use ?
scanf or gets or what ??
and If I must use scanf what should I use whit it ? "%d'' or "%s" ...etcI'm waitting for your helpCode:#include <stdio.h> typedef struct fiche fiche; typedef enum Booleen Booleen ; typedef enum Categorie Categorie ; enum Booleen {vrai,faux}; enum Categorie {Conte=0,Policier=1,Roman=2,Histoire=3}; struct fiche { int cote ; char titre [100]; Categorie categorie; Booleen emprunter ; int annee ; }; main() { FILE* bib; int nblivre,i; fiche biblio[500]; /************************************************************************************************************/ scanf("%d",&biblio[i].emprunter); printf("Donnez l'annee de l'edition :"); getchar(); scanf("%d",&biblio[i].annee); }
and thank you !