MODIF P2 reflexion pour l'erreur v2

master
Matheo THIERRY 2 years ago
parent a5d7cd63fc
commit 37b4272962

@ -87,15 +87,16 @@ Listchoixdept inserercarte(Listchoixdept c, FILE *fe){
return cc;
}
Listchoixdept lireChoix(FILE *fe, int nbchoix){
Maillonchoix lireChoix(FILE *fe, int nbchoix){
int i=0;
int decision, validation;
char Ville[21], dep[21];
Listchoixdept c, temp;
Maillonchoix c, temp;
c = listchoixdeptvide();
for(i=0; i<nbchoix; i++){
c = inserercarte(c, fe);
}
return c;
}
listetuinfo lireEtu(FILE *fe){
@ -119,7 +120,7 @@ int chargeretudiant(char nomFich[], listetuinfo *tetu[], int tmax){
while(!feof(fe)){
if(i==tmax){printf("<! erreur fichier in chargeetudiant !>");fclose(fe);return-1;}
printf("bonjour");
a = lireEtu(fe);
//a = lireEtu(fe);
tetu[i] = (listetuinfo*)malloc(sizeof(listetuinfo));
if(tetu[i]==NULL){printf("<! pb malloc in chargeretudiant !>\n");fclose(fe);return-1;}
*tetu[i] = a;

Loading…
Cancel
Save