From c4ef8fb2d9e4763cf9b038c5439b75ea2a086899 Mon Sep 17 00:00:00 2001 From: "yann.champeau" Date: Fri, 13 Jan 2023 18:14:17 +0100 Subject: [PATCH] Nom resp --- src/partie1/saeP1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/partie1/saeP1.c b/src/partie1/saeP1.c index b400353..0107d8d 100644 --- a/src/partie1/saeP1.c +++ b/src/partie1/saeP1.c @@ -356,7 +356,8 @@ void modifNomResponsable(VilleIUT* tiut[],int tlogi){ while(m->departement!=dep) m=m->suivant; printf("\n\nLe responsable du département %s de l'IUT de la ville de %s est actuellement %s. Quel est le nom du nouveau responsable ?\n\n",m->departement,v->Ville,m->resp); char nom[51]; - scanf("%s",nom); + scanf("%*c"); + fgets(m->nom, 51, stdin); strcpy(m->resp,nom); printf("\n\nLe nom du responsable du département %s de l'IUT de %s a bien été changé pour %s.\n",dep,ville,nom); return;