diff --git a/source/candidat.c b/source/candidat.c index da84179..2932cf3 100644 --- a/source/candidat.c +++ b/source/candidat.c @@ -1,6 +1,11 @@ #include "../header/sae.h" +/** + @brief Modifie les informations d'un candidat + @param c Pointeur vers le candidat à modifier + @return Pointeur vers le candidat modifié +*/ Candidat *modifierCandidat(Candidat *c) { int choix; @@ -16,11 +21,12 @@ Candidat *modifierCandidat(Candidat *c) case 2: printf("Prenom actuel : %s\nVeuillez saisir le nouveau prenom\n", c->prenom); fgets(c->nom, 50, stdin); - c->nom[strlen(c->nom) - 1] = '\0'; + c->prenom[strlen(c->prenom) - 1] = '\0'; break; case 3: - printf("Voici les notes actuels : %.2f %.2f %.2f %.2f\nVeuillez saisir les nouvelles notes(note1/note2/note3/note4", c->notes[0], c->notes[1], c->notes[2], c->notes[3]); + printf("Voici les notes actuels : %.2f %.2f %.2f %.2f\nVeuillez saisir les nouvelles notes(note1/note2/note3/note4)", c->notes[0], c->notes[1], c->notes[2], c->notes[3]); scanf("%f/%f/%f/%f", &c->notes[0], &c->notes[1], &c->notes[2], &c->notes[3]); break; } + return c; } \ No newline at end of file