SAE 1.02 (encore en train de règlé des petits bugs de rejeterVoeux

master
Alexis LAURENT 2 years ago
parent f3618e5fd5
commit 380663938a

@ -5,7 +5,7 @@ Bocluse Paul
Clermont-Ferrand Clermont-Ferrand
2 2
Informatique Informatique
0 1
0 0
Réseaux Réseaux
0 0
@ -42,7 +42,7 @@ Qui Roté Don
Clermont-Ferrand Clermont-Ferrand
2 2
Informatique Informatique
0 1
0 0
Réseaux Réseaux
0 0
@ -53,7 +53,7 @@ Cool Michel
Clermont-Ferrand Clermont-Ferrand
2 2
Informatique Informatique
0 1
0 0
Réseaux Réseaux
0 0
@ -64,7 +64,7 @@ Skater Matteo
Clermont-Ferrand Clermont-Ferrand
2 2
Informatique Informatique
0 2
0 0
Réseaux Réseaux
0 0

Binary file not shown.

24
SAE.c

@ -964,6 +964,13 @@ void supprimerCandid(Candidat **tab, int *nbEle)
return; return;
} }
void decalagenom(char* tab, int pos, int nbEle)
{
int i;
for(i = pos; i < nbEle - 1; i++)
tab[i] = tab[i + 1];
}
Candidat **reallocTCandid(Candidat **tab, int *tailleP) Candidat **reallocTCandid(Candidat **tab, int *tailleP)
{ {
Candidat **aux; Candidat **aux;
@ -987,9 +994,9 @@ void creationCandid(VilleIUT **tiut, int nbIUT, Candidat **tcandid, int *nbCandi
while(1) while(1)
{ {
idAdd = tcandid[*nbCandid - 1]->id + 1; idAdd = tcandid[*nbCandid - 1]->id + 1;
printf("Votre prénom : ");
scanf("%s%*c", prenom);
printf("Votre nom : "); printf("Votre nom : ");
scanf("%s%*c", prenom);
printf("Votre prénom : ");
fgets(nom,30, stdin); fgets(nom,30, stdin);
nom[strlen(nom) - 1] = '\0'; nom[strlen(nom) - 1] = '\0';
printf("%s %s\n", prenom, nom); printf("%s %s\n", prenom, nom);
@ -1020,7 +1027,7 @@ void creationCandid(VilleIUT **tiut, int nbIUT, Candidat **tcandid, int *nbCandi
printf("voulez vous faire votre choix maintenant (oui|non) : "); printf("voulez vous faire votre choix maintenant (oui|non) : ");
scanf("%s", choix); scanf("%s", choix);
if (strcmp(choix, "oui")==0) if (strcmp(choix, "oui")==0)
modifCandid(tcandid, *nbCandid, tiut, 0, *nbCandid - 1); modifCandid(tcandid, *nbCandid, tiut, nbIUT, *nbCandid - 1);
if (strcmp(choix, "non")==0) if (strcmp(choix, "non")==0)
break; break;
return; return;
@ -1892,7 +1899,7 @@ int decision(void)
return choix; return choix;
} }
void gérerAdmiCandid(Candidat **tab, int nbCandid) void gererAdmiCandid(Candidat **tab, int nbCandid)
{ {
int id, pos, trouve, i, irech; int id, pos, trouve, i, irech;
char ville[30], dept[30], choix; char ville[30], dept[30], choix;
@ -1955,6 +1962,8 @@ void gérerAdmiCandid(Candidat **tab, int nbCandid)
break; break;
} }
} }
if (!verifSelection())
break;
} }
} }
if(!verifSelection()) if(!verifSelection())
@ -1968,9 +1977,4 @@ void gérerAdmiCandid(Candidat **tab, int nbCandid)
} }
} }
void decalagenom(char* tab, int pos, int nbEle)
{
int i;
for(i = pos; i < nbEle - 1; i++)
tab[i] = tab[i + 1];
}

@ -190,6 +190,8 @@ void gestionCandid(VilleIUT **tiut, int nbIUT, Candidat **tcandid, int *nbCandid
int menuGestionCandid(void); int menuGestionCandid(void);
void decalagenom(char* tab, int pos, int nbEle);
ListeCandid recherchecandidIUT(ListeCandid l, char code[]); ListeCandid recherchecandidIUT(ListeCandid l, char code[]);
int recherchecandidDept(ChoixDept **tab,int nbEle, char code[],int *trouve); int recherchecandidDept(ChoixDept **tab,int nbEle, char code[],int *trouve);
@ -260,6 +262,4 @@ void rejeterVoeux(ListeCandid l, char ville[]);
int decision(void); int decision(void);
void gérerAdmiCandid(Candidat **tab, int nbCandid); void gererAdmiCandid(Candidat **tab, int nbCandid);
void decalagenom(char* tab, int pos, int nbEle);

@ -1,2 +1,3 @@
Paul Bocluse 12.0 Paul Bocluse 12.0
Don Qui Roté 10.0 Don Qui Roté 10.0
Michel Cool 13.2

@ -1,2 +1 @@
Michel Cool 13.2
Matteo Skater 13.0 Matteo Skater 13.0

BIN
exe

Binary file not shown.
Loading…
Cancel
Save