From b02f51bec8f9c18f84d7be1e319a50c7af2eddec Mon Sep 17 00:00:00 2001 From: loris OBRY Date: Fri, 13 Jan 2023 14:13:28 +0100 Subject: [PATCH 1/3] Debug afficherDeptDonne et existeVille --- source/sae.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/sae.c b/source/sae.c index fa52ede..864db86 100644 --- a/source/sae.c +++ b/source/sae.c @@ -514,13 +514,13 @@ void afficherDeptIutDonne(VilleIut **villeIut, int nbVille) afficheVillesIUT(villeIut, nbVille); printf("Veuillez saisir le nom de l'iut que vous voulez afficher.\n"); scanf("%s", nom); - res = existeVille(villeiut, nbVille, nom); + res = existeVille(villeIut, nom, nbVille); if (res == -1) { printf("Cet IUT n'existe pas\n"); return ; } - afficherListe(villeiut[res]->lDept); + afficherListe(villeIut[res]->lDept); } /** @@ -612,7 +612,7 @@ int existeVille( VilleIut * tIut[], char ville[], int nbvilles ) int i = 0; //recherche de la ville - for( e = 0; i < nbvilles; i ++ ) + for( i = 0; i < nbvilles; i ++ ) { if ( strcmp( tIut[i] -> nom, ville ) == 0 ) return i; // ville trouvée... } From 6644d1602581dbe8cfe0b14c5d842d4dfb0811c8 Mon Sep 17 00:00:00 2001 From: loris OBRY Date: Fri, 13 Jan 2023 14:15:37 +0100 Subject: [PATCH 2/3] Plus de commentaires pour existeVille et Affichervileldonne --- source/sae.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/sae.c b/source/sae.c index cba75ca..864db86 100644 --- a/source/sae.c +++ b/source/sae.c @@ -506,7 +506,7 @@ int modifieRespDept(VilleIut *tVilleIut[], int nbVilles, char ville[], char nomD return 0; } -/*void afficherDeptIutDonne(VilleIut **villeIut, int nbVille) +void afficherDeptIutDonne(VilleIut **villeIut, int nbVille) { int res; char *nom; @@ -607,7 +607,7 @@ void afficheNbPlacesDep(VilleIut *tVilleIut[], int nbVilles, char nomDept[]) } } -/*int existeVille( VilleIut * tIut[], char ville[], int nbvilles ) +int existeVille( VilleIut * tIut[], char ville[], int nbvilles ) { int i = 0; @@ -617,7 +617,7 @@ void afficheNbPlacesDep(VilleIut *tVilleIut[], int nbVilles, char nomDept[]) if ( strcmp( tIut[i] -> nom, ville ) == 0 ) return i; // ville trouvée... } return -1; -}*/ +} /** * Affiche et gère le menu administrateur. From 5ede35386176123e619b9d38573e796498f19bad Mon Sep 17 00:00:00 2001 From: loris OBRY Date: Fri, 13 Jan 2023 14:20:32 +0100 Subject: [PATCH 3/3] lchoix, mise en commentaire de afficherCandidat et afficherCandidats --- header/sae.h | 2 +- source/sae.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/header/sae.h b/header/sae.h index a11c0c7..071c527 100644 --- a/header/sae.h +++ b/header/sae.h @@ -43,7 +43,7 @@ typedef struct char prenom[50]; float notes[4]; int nbChoix; - Choix *choix; + lChoix lchoix; }Candidat; //Proposition de structure de candidature pour la Partie 3 ( jean ) : diff --git a/source/sae.c b/source/sae.c index 864db86..81afdeb 100644 --- a/source/sae.c +++ b/source/sae.c @@ -698,7 +698,7 @@ void menuAdmin(VilleIut **villeIut, int nbVilles) * @brief Affiche les informations d'un candidat * @param candidat Le candidat à afficher */ -void afficherCandidat(Candidat candidat) +/* void afficherCandidat(Candidat candidat) { printf("Numéro du candidat : %d\n", candidat.numero); printf("Nom : %s\n", candidat.nom); @@ -713,7 +713,7 @@ void afficherCandidat(Candidat candidat) printf(" Décision du département : %d\n", candidat.choix[i].decisionDepartement); printf(" Validation : %d\n", candidat.choix[i].validationCandidat); } -} +} */ /** * @brief Affiche la liste des candidats @@ -721,14 +721,14 @@ void afficherCandidat(Candidat candidat) * @param candidats Le tableau de candidats à afficher * @param nbCandidats Le nombre de candidats dans le tableau */ -void afficherCandidats(Candidat *candidats, int nbCandidats) +/*void afficherCandidats(Candidat *candidats, int nbCandidats) { for (int i = 0; i < nbCandidats; i++) { printf("\nCandidat %d :\n", i + 1); afficherCandidat(candidats[i]); } -} +} */ /* ================================================