From 9b97b9c087b6ba6618c9637f6e0bccfa01688f33 Mon Sep 17 00:00:00 2001 From: Lola CHALMIN Date: Wed, 14 Dec 2022 17:24:30 +0100 Subject: [PATCH] finito pour ce soir --- part1.c | 7 ++++++- part1.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/part1.c b/part1.c index 50330c1..7dcf06b 100644 --- a/part1.c +++ b/part1.c @@ -118,7 +118,12 @@ ListDept MaJnbP(VilleIUT **tV, char *ville, char dpt, int newnbP) - +ListDept recherche (ListDept l, char *nom ) +{ + if ( l == NULL ){ return l;} + if ( strcmp ( l->departement, nom ) == 0) return l; + return recherche (l->suiv, nom ); +} diff --git a/part1.h b/part1.h index dd1e45e..9070bdb 100644 --- a/part1.h +++ b/part1.h @@ -26,3 +26,4 @@ int Chargement(VilleIUT **tV, int tmax, char *nameFile); void AfficheDpmt ( MaillonDept *dpt ); void afficheIUT (VilleIUT *iut); void Affichetableau(VilleIUT ** TabIUT, int n ); +Liste recherche (Liste l, char *nom );