Ajustements.

master
Yann CHAMPEAU 3 years ago
parent 3d1e3f6520
commit 8435d4c0b5

@ -162,23 +162,25 @@ void ListeCandidat(int nbcandidat,candidat *tcandidat[])
printf("Candidat non trouvé"); printf("Candidat non trouvé");
} }
void Candidater(VilleIUT* tiut[],int tlogi, candidat* tcandidat[], int numcandid) void Candidater(VilleIUT* tiut[],int tlogi, candidat* tcandidat[], int nbcandidat)
{ {
char VilleRech[31]; char VilleRech[31];
printf("Veuillez entrez la ville de l'IUT au quel vous souhaitez candidatez :"); printf("Veuillez entrez la ville de l'IUT au quel vous souhaitez candidatez : ");
scanf("%s",VilleRech); scanf("%s",VilleRech);
int ind=rechercheIUT(tiut,tlogi,VilleRech); int ind=rechercheIUT(tiut,tlogi,VilleRech);
if(ind==-1) return; if(ind==-1) return;
else else
{ {
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);
if (existeDep(tiut[ind]->ldept, DepRech)==0) return; if (existeDep(tiut[ind]->ldept, DepRech)==0) return;
else else
{ {
int i; int i, numcandid;
for (i=0;tcandidat[i]->numcandid!=numcandid;++i); printf("Veuillez entrez le numéro du candidat qui lui a été attribué : ");
scanf("%d",&numcandid);
for (i=0;tcandidat[i]->numcandid!=numcandid && i<nbcandidat;++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);

@ -116,7 +116,7 @@ void ListeCandidat(int nbcandidat,candidat *tcandidat[]);
* \param [in,out] tcandidat Tableau contenant les candidats. * \param [in,out] tcandidat Tableau contenant les candidats.
* \param [in] numcandid numéro du candidat à chercher. * \param [in] numcandid numéro du candidat à chercher.
*/ */
void Candidater(VilleIUT* tiut[],int tlogi, candidat* tcandidat[],int numcandid); void Candidater(VilleIUT* tiut[],int tlogi, candidat* tcandidat[], int nbcandidat;
/* /*
Permet de candidater dans un IUT Permet de candidater dans un IUT
Entrée : Entrée :

Loading…
Cancel
Save