From 6b64a76e00be3f6f55314adddd36c8ca354d9282 Mon Sep 17 00:00:00 2001 From: Yann CHAMPEAU Date: Fri, 13 Jan 2023 22:10:54 +0100 Subject: [PATCH] Old --- src/partie2/saeP2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/partie2/saeP2.c b/src/partie2/saeP2.c index 291ac9d..0cefb22 100644 --- a/src/partie2/saeP2.c +++ b/src/partie2/saeP2.c @@ -174,20 +174,20 @@ void Candidater(VilleIUT* tiut[],int tlogi, candidat* tcandidat[], int nbcandida char DepRech[31]; printf("Veuillez entrez le département dans lequel vous souhaitez y postuler : "); scanf("%s",DepRech); - printf("Check !\n"); if (existeDep(tiut[ind]->ldept, DepRech)==0) return; else { int i, numcandid; printf("Veuillez entrez le numéro du candidat qui lui a été attribué : "); scanf("%d",&numcandid); - for (i=0;tcandidat[i]->numcandid!=numcandid && inumcandid!=numcandid;++i); voeu* voeu_ajout = (voeu*) malloc (sizeof(voeu)); strcpy(voeu_ajout->ville,VilleRech); strcpy(voeu_ajout->dep,DepRech); voeu_ajout->ddep=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++; }