From 3cfc6b695004888131c4561d8436b51b5b763a20 Mon Sep 17 00:00:00 2001 From: Alix JEUDI--LEMOINE Date: Thu, 29 Dec 2022 22:35:13 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20sauvegarde=20des=20fichiers?= =?UTF-8?q?=20=C3=A0=20la=20fermeture=20+=20changement=20de=20l'appel=20de?= =?UTF-8?q?=20ajouterCandidat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/I/un.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/I/un.c b/src/I/un.c index afb4c3b..34145eb 100644 --- a/src/I/un.c +++ b/src/I/un.c @@ -61,12 +61,12 @@ void identificationCandidat(int* id, ListeCandidats* listePointer, int* nbCandid printf("Moyenne en spécialité : "); scanf("%f", &candidat->moyenneSpecialite); - ajouterCandidat(*listePointer, nbCandidats, candidat); // realloc - *id = *nbCandidats; + ajouterCandidat(listePointer, nbCandidats, candidat); // realloc + *id = candidat->id; printf("\n\n\e[1mParfait ! Votre ID est \e[1;32m%d\e[0m\e[1m, ne le perdez pas, " "il vous suivera tout le long de vos candidatures !\n\e[1;91m" - "N'oubliez pas de revenir au menu principal pour vous déconnecter à la fin de votre session !\n\n\e[0m", *id); + "N'oubliez pas de revenir au menu principal pour vous déconnecter à la fin de votre session !\n\n\e[0m", candidat->id); } } @@ -487,6 +487,10 @@ void menuPrincipal(/* TODO: prise en compte des status actuels du recrutement */ choix=0; } + printf("\nSauvegarde des IUT...\n"); + saveVilles(tiut, nbVilles); + printf("Sauvegarde des Candidats...\n"); + saveCandidats(liste, nbCandidats); printf("\nFermeture de l'application...\n"); }