Yann CHAMPEAU 3 years ago
parent 206a4e26f6
commit 6b64a76e00

@ -174,20 +174,20 @@ void Candidater(VilleIUT* tiut[],int tlogi, candidat* tcandidat[], int nbcandida
char DepRech[31]; char DepRech[31];
printf("Veuillez entrez le département dans lequel vous souhaitez y postuler : "); printf("Veuillez entrez le département dans lequel vous souhaitez y postuler : ");
scanf("%s",DepRech); scanf("%s",DepRech);
printf("Check !\n");
if (existeDep(tiut[ind]->ldept, DepRech)==0) return; if (existeDep(tiut[ind]->ldept, DepRech)==0) return;
else else
{ {
int i, numcandid; int i, numcandid;
printf("Veuillez entrez le numéro du candidat qui lui a été attribué : "); printf("Veuillez entrez le numéro du candidat qui lui a été attribué : ");
scanf("%d",&numcandid); scanf("%d",&numcandid);
for (i=0;tcandidat[i]->numcandid!=numcandid && i<nbcandidat;++i); for (i=0; i<nbcandidat && tcandidat[i]->numcandid!=numcandid;++i);
voeu* voeu_ajout = (voeu*) malloc (sizeof(voeu)); voeu* voeu_ajout = (voeu*) malloc (sizeof(voeu));
strcpy(voeu_ajout->ville,VilleRech); strcpy(voeu_ajout->ville,VilleRech);
strcpy(voeu_ajout->dep,DepRech); strcpy(voeu_ajout->dep,DepRech);
voeu_ajout->ddep=0; voeu_ajout->ddep=0;
voeu_ajout->vcand=0; voeu_ajout->vcand=0;
tcandidat[i]->TabVoeu[tcandidat[i]->nbchoix]=voeu_ajout; tcandidat[i]->TabVoeu[tcandidat[i]->nbchoix-1]=voeu_ajout;
printf("Check !\n");
tcandidat[i]->nbchoix++; tcandidat[i]->nbchoix++;
} }

Loading…
Cancel
Save