Toute les fonction des 3 première partie fonctionne

master
Alexis LAURENT 2 years ago
parent c84e773ac9
commit f05db1c5fb

@ -1 +1,71 @@
6
Bocluse Paul
14.0 9.0 7.0 18.0
2
Clermont-Ferrand
2
Informatique
0
0
Réseaux
0
0
Lyon
1
Jeux-videos
0
0
Hirrite Sam
17.0 17.0 14.0 11.0
1
Lyon
1
GEA
0
0
Alone Guy
11.0 9.5 4.7 8.9
2
Clermont-Ferrand
1
Réseaux
0
0
Lyon
1
GEA
0
0
Qui Roté Don
14.0 5.0 9.0 12.0
1
Clermont-Ferrand
2
Informatique
0
0
Réseaux
0
0
Cool Michel
14.0 9.0 12.0 18.0
1
Clermont-Ferrand
2
Informatique
0
0
Réseaux
0
0
Skater Matteo
10.0 14.0 15.0 13.0
1
Clermont-Ferrand
2
Informatique
0
0
Réseaux
0
0

26
SAE.c

@ -1528,26 +1528,41 @@ void SauvegardeCandid(Candidat **tabC, int nbCandid)
FILE *flot;
flot = fopen("Candidres.txt", "w");
fprintf(flot,"%d\n", nbCandid);
for (i = 0; i > nbCandid; i++)
for (i = 0; i < nbCandid; i++)
{
printf("1\n");
fprintf(flot, "%s %s\n", tabC[i]->prenom, tabC[i]->nom);
printf("2\n");
fprintf(flot, "%.1f %.1f %.1f %.1f\n", tabC[i]->note[0], tabC[i]->note[1], tabC[i]->note[2], tabC[i]->note[3]);
printf("3\n");
nbIUT = longueur(tabC[i]->idCandIUT);
printf("4\n");
fprintf(flot,"%d\n",nbIUT);
printf("5\n");
SauvegarderCandidIUT(tabC[i]->idCandIUT, flot);
printf("100\n");
free(tabC[i]);
}
system("clear");
fclose(flot);
}
void SauvegarderCandidIUT(ListeCandid l, FILE *flot)
{
MaillonCandid *tmp;
if (tmp == NULL)
{
printf("Pb Malloc \n");
exit(1);
}
while(l != NULL)
{
tmp = l;
fprintf(flot, "%s\n%s", l->iutCandid, l->nbChoix);
printf("6\n");
fprintf(flot, "%s\n%d\n", l->iutCandid, l->nbChoix);
printf("7\n");
SauvegardeCandidDept(l->tabDept, l->nbChoix, flot);
printf("50\n");
l = l->suiv;
free(tmp);
}
@ -1558,8 +1573,11 @@ void SauvegardeCandidDept(ChoixDept **tDept, int nbDept, FILE *flot)
{
int i;
for(i = 0; i < nbDept; i++)
fprintf(flot, "%s\n%d\n%d", tDept[i]->departement, tDept[i]->decisionDept, tDept[i]->decisionCandid);
{
printf("8\n");
fprintf(flot, "%s\n%d\n%d\n", tDept[i]->departement, tDept[i]->decisionDept, tDept[i]->decisionCandid);
printf("9\n");
}
}

Loading…
Cancel
Save