From b986704691dd715687d7e027d88e242d95522443 Mon Sep 17 00:00:00 2001 From: Sami GHEBRID Date: Fri, 16 Dec 2022 15:05:52 +0100 Subject: [PATCH] Modif struct de commun.c et .h 16/12 14h54 --- Commun.c | 10 +--------- Commun.h | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/Commun.c b/Commun.c index b4377ea..ad4bd9d 100644 --- a/Commun.c +++ b/Commun.c @@ -91,12 +91,4 @@ bool rechercher(Liste l, int x){ return rechercher(l->suiv,x); } -Mat lireMat(FILE *fe){ - int i; - Mat m; - fscanf(fe,"%s%d%*c",&m.code,&m.coeff); - fgets(m.desig,32,fe); - m.desig[strlen(m.desig)-1]='\0'; - return m; -} - + diff --git a/Commun.h b/Commun.h index 34ebbcb..cefb6e4 100644 --- a/Commun.h +++ b/Commun.h @@ -5,11 +5,15 @@ //################ Types de structures ############### -typedef struct maillonDept -{ +typedef struct{ char dept[31]; int nbP; char respAd[31]; +}Departement; + +typedef struct maillonDept +{ + Departement d; struct maillonDept *suiv; }MaillonDept,*ListeDept; @@ -22,13 +26,12 @@ typedef struct }VilleIUT; ListeDept listenouv(void); -ListeDept InsérerEntete(ListeDept d,int nb); -Liste Insérer(Liste l, int x); -Liste supprimerEntete(Liste l); -Liste supprimer(Liste l, int x); -int longueur(Liste l); -bool vide(Liste l); -Liste ajouterEnqueue(Liste l, int x); -int tete(Liste l); -bool rechercher(Liste l, int x); -Mat lireMat(FILE *fe); \ No newline at end of file +ListeDept InsérerEntete(ListeDept l,int nb); +ListeDept Insérer(Liste l, int x); +ListeDept supprimerEntete(ListeDept l); +ListeDept supprimer(ListeDept l, int x); +int longueur(ListeDept l); +bool vide(ListeDept l); +ListeDept ajouterEnqueue(ListeDept l, int x); +int tete(ListeDept l); +bool rechercher(ListeDept l, int x);