fix truc du truc la truc trés truc imo

master
cyriaque.segerie 1 year ago
parent 595a56f615
commit bfec3a7ed9

@ -120,15 +120,15 @@ int suspensioncarte (int *n)
fscanf(fichierClientmegacool,"%d%f%d",&nc,&cagnotte,&suspension); fscanf(fichierClientmegacool,"%d%f%d",&nc,&cagnotte,&suspension);
while (feof(fichierClientmegacool)==0) while (feof(fichierClientmegacool)==0)
{ {
tabNC[compteur]=nc; if (compteur>*n)
tabCAG[compteur]=cagnotte;
tabsuspension[compteur]=suspension;
compteur=compteur+1;
if (compteur>*n)
{ {
printf("erreur de taille\n"); printf("erreur de taille\n");
return 0; return 0;
} }
tabNC[compteur]=nc;
tabCAG[compteur]=cagnotte;
tabsuspension[compteur]=suspension;
compteur=compteur+1;
fscanf(fichierClientmegacool,"%d%f%d",&nc,&cagnotte,&suspension); fscanf(fichierClientmegacool,"%d%f%d",&nc,&cagnotte,&suspension);
} }
fclose (fichierClientmegacool); fclose (fichierClientmegacool);
@ -281,15 +281,15 @@ int supressionclient (int *n)
fscanf(fichierClientmegacool,"%d%f%d",&nc,&cagnotte,&suspension); fscanf(fichierClientmegacool,"%d%f%d",&nc,&cagnotte,&suspension);
while(feof(fichierClientmegacool)==0) while(feof(fichierClientmegacool)==0)
{ {
tabNC[compteur]=nc; if (compteur>*n)
tabCAG[compteur]=cagnotte;
tabsuspension[compteur]=suspension;
compteur=compteur+1;
if (compteur>*n)
{ {
printf("erreur de taille\n"); printf("erreur de taille\n");
return 0; return 0;
} }
tabNC[compteur]=nc;
tabCAG[compteur]=cagnotte;
tabsuspension[compteur]=suspension;
compteur=compteur+1;
fscanf(fichierClientmegacool,"%d%f%d",&nc,&cagnotte,&suspension); fscanf(fichierClientmegacool,"%d%f%d",&nc,&cagnotte,&suspension);
} }
fclose(fichierClientmegacool); fclose(fichierClientmegacool);

@ -1 +1,2 @@
12 0.00 0 12 0.00 0
75 0.00 0

Binary file not shown.
Loading…
Cancel
Save