From f2fa4ab7e48413461b2a81bc9129ec4b868969d8 Mon Sep 17 00:00:00 2001 From: "Johnny.Ratton" Date: Wed, 14 Dec 2022 17:35:52 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Cr=C3=A9ation=20fonctions=20globale=20et=20?= =?UTF-8?q?chargement=2014/12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jsae.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Jsae.c b/Jsae.c index 37d15c5..d4c21d4 100644 --- a/Jsae.c +++ b/Jsae.c @@ -1 +1,27 @@ -#include "Jsae.h" \ No newline at end of file +#include "Jsae.h" + +int chargement(VilleIUT *tiut[],int *tMax) +{ + FILE *flot; + VilleIUT v; + MaillonDept m; + flot = fopen("") +} + +void globale(void) +{ + int tLog, tMax = 10; + VilleIUT **tiut; + tiut = (VilleIUT **)malloc(sizeof(VilleIUT *) * 10); + if(tiut == NULL) + { + printf("Problème d'allocation mémoire du tableau tiut\n"); + exit(1); + } + tLog = chargement(tiut,&tMax); + if(tLog == -1) + { + printf("Le programme ne peut pas fonctionner\n"); + exit(1); + } +} \ No newline at end of file From 94ef0a2f51a4fbe152244c26385861789576a494 Mon Sep 17 00:00:00 2001 From: Sami GHEBRID Date: Wed, 14 Dec 2022 17:46:28 +0100 Subject: [PATCH 2/2] Menu + clearpage 14/12 17h46 --- Ssae.c | 24 +++++++++++++++++++++++- Ssae.h | 33 +++++++++++++++++++++++++++++++++ Stest.c | 6 +++++- 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/Ssae.c b/Ssae.c index c97fc5a..51068e8 100644 --- a/Ssae.c +++ b/Ssae.c @@ -1 +1,23 @@ -#include"Ssae.h" \ No newline at end of file +#include"Ssae.h" + +void menuAdmin(VilleIUT *tiut[], int *tLog, int tMax){ + int select=0; + while(select!=9){ + system("clear") + printf("\t AFFICHAGE ADMIN\n\n"); + printf("1\tModifier le nombre de places dans un département\n"); + printf("2\tCréer un nouveau département\n"); + printf("3\tSupprimer un département\n"); + printf("4\tLancer/Arrêter la phase de candidature\n"); + printf("5\tModifer le nom du responsable d'un département\n"); + scanf("%d",&select); + + } +} +void clearpage(void) +{ + char entre; + printf("\nappuyé sur la touche [ENTREE] pour continuer"); + scanf("%*c%c", &entre); + system("clear"); +} \ No newline at end of file diff --git a/Ssae.h b/Ssae.h index 4c01d58..03cd37e 100644 --- a/Ssae.h +++ b/Ssae.h @@ -2,3 +2,36 @@ #include #include #include + +//################ Fonction Menu ##################### + +void menuAdmin(VilleIUT *tiut[], int *tLog, int tMax); +void menuCandidat(VilleIUT *tiut[], int *tLog, int tMax); + +//################ Types de structures ############### + +typedef struct maillonDept +{ + char dept[31]; + int nbP; + char respAd[31]; + struct mailllonDept *suiv; + +}MaillonDept,*ListeDept; + +typedef struct +{ + char nom[31]; + ListeDept *lDept; + +}VilleIUT; + +//################ Fonctions communes ################# + +void clearpage(void); + + + + + + diff --git a/Stest.c b/Stest.c index c97fc5a..e03c675 100644 --- a/Stest.c +++ b/Stest.c @@ -1 +1,5 @@ -#include"Ssae.h" \ No newline at end of file +#include"Ssae.h" + +int main(void){ + +} \ No newline at end of file