From 2421523580baf9af23a47ff56024e11aa3c486e2 Mon Sep 17 00:00:00 2001 From: Antoine PEREDERII Date: Tue, 8 Nov 2022 17:43:05 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20du=20fichier=20membres=20et=20Activites?= =?UTF-8?q?Jour=20=C3=A0=20jour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ActivitesJour.don | 2 +- SAE.c | 16 ++++++++-------- SAE.h | 4 +++- exe | Bin 0 -> 16952 bytes membres.don | 2 +- testSAE.c | 11 ++++++++--- 6 files changed, 21 insertions(+), 14 deletions(-) create mode 100755 exe diff --git a/ActivitesJour.don b/ActivitesJour.don index dd53725..7224ff2 100644 --- a/ActivitesJour.don +++ b/ActivitesJour.don @@ -1,2 +1,2 @@ Date nbActivitesJour -13/05/2022 120 +13052022 120 diff --git a/SAE.c b/SAE.c index a72435d..1f85ed6 100644 --- a/SAE.c +++ b/SAE.c @@ -5,7 +5,7 @@ int Ouverture(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[] int i = 0, j = 0; int NoCarte, age, pointsCarte, CarteActive; int Date, nbActivitesJour; - FILE *flot *jour; + FILE *flot, *jour; flot = fopen("membres.don", "r"); jour = fopen("ActivitesJour.don", "r"); if(flot == NULL) @@ -18,8 +18,8 @@ int Ouverture(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[] printf("Pb d'ouverture du fichier ActivitesJour.don\n"); return -1; } - fscanf(flot, "%d%d%d%d%d%d%d", &NoCarte, &nom, &prenom, &age, &pointsCarte, &CarteActive, &nbActivitéesJour); - fscanf(jour, "%d%d", &Date, &nbActivitéesJour); + fscanf(flot, "%d%d%d%d%d%d%d", &NoCarte, &age, &pointsCarte, &CarteActive); + fscanf(jour, "%d%d", &Date, &nbActivitesJour); while(!feof(flot)) { if(i == tmax) @@ -32,7 +32,7 @@ int Ouverture(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[] tage[i] = age; tPointsCarte[i] = pointsCarte; tCarteActive[i] = CarteActive; - fscanf(flot, "%d%d%d%d%d%d%d", &NoCarte, &nom, &prenom, &age, &pointsCarte, &CarteActive, &nbActivitéesJour); + fscanf(flot, "%d%d%d%d", &NoCarte, &age, &pointsCarte, &CarteActive); i++; } while(!feof(jour)) @@ -43,16 +43,16 @@ int Ouverture(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[] fclose(jour); return -1; } - Date[j] = Date; + tDate[j] = Date; tNbActivitesJour[j] = nbActivitesJour; - fscanf(jour, "%d%d", &Date, &nbActivitéesJour); + fscanf(jour, "%d%d", &Date, &nbActivitesJour); j++; } fclose(jour); fclose(flot); return i; } - +/* void pointsBonus() { @@ -100,4 +100,4 @@ int FrequenceCentre() { } - +*/ diff --git a/SAE.h b/SAE.h index 2e98468..f8e73d7 100644 --- a/SAE.h +++ b/SAE.h @@ -2,7 +2,9 @@ #include int Ouverture(); +void testOuverture(); +/* int pointsBonus(); void sauvegarde(); int CreationAdherent(); -int FrequenceCentre(); \ No newline at end of file +int FrequenceCentre();*/ \ No newline at end of file diff --git a/exe b/exe new file mode 100755 index 0000000000000000000000000000000000000000..9d746938c96e5b12b29535eb7bcdd4416510625c GIT binary patch literal 16952 zcmeHPdu&_P89$DjHigznUl3?nFC7)_wm50mrY{BTByMkz(}vO(2DBF^b{ez9&g|>1 z?LbSF2IQq?{i8@s11%F`W1A**52Ow;2oxyr$J8R2Djp)RA{-uFU}XwhsrUQNJ)e7h zV}qtW{_-jI?|jemo$s7`bC2&id_NG}SmAOBE^cw1AZnz>;`o%{*m_j~_{3UqDZalV zt`gHhPm?@L?y~?=tMpV9VwK{%fn@ink~?vc(qrTZ3CXTh8KHns7=`Kw*;SH2(N4@r zp%9EL&$p+MF^VR?^Z0;@pV4kdp=9eU{cKYq_A9%+3fYcGvYS+Plgf^9i~>So6m*PWmt6v9Dvv`E3B7f>5ELHj;(259a!JAuzKcfVH zSqc8E68!5*@aL7_9|B*)$62V~#p3)i_?lB0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Lm;RBm>(q{tW`VJwN~I%AVtN z+B5wbD&&jf=jXs%ls&h@`YIhviVLU_PpRkmY=3Q@V^!GRjy(75ssqa5s7gHj9rEJC t@$h|-t`CmgZttUoCJO)m1uV*nmFtAGEGTAwbe*L&g9Eil*;iGS@GtyPk>>ya literal 0 HcmV?d00001 diff --git a/membres.don b/membres.don index 1d0d59a..8a686ff 100644 --- a/membres.don +++ b/membres.don @@ -1 +1 @@ -Ncarte nom prenom age pointsCarte carteActive nbActivitesJour +Ncarte age pointsCarte carteActive diff --git a/testSAE.c b/testSAE.c index aa58253..1b85ce7 100644 --- a/testSAE.c +++ b/testSAE.c @@ -3,12 +3,17 @@ void testOuverture() { int tNoCarte[500], tage[500], tPointsCarte[500], tCarteActive[500]; - int Date[500], tNbActivitesJour[500]; - int tmax = 500, pas; + int tDate[500], tNbActivitesJour[500]; + int tmax = 500, pas, i; pas = Ouverture(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, &tmax); + printf("Pas: %d", &pas); + printf("Ncarte nom prenom age pointsCarte carteActive nbActivitesJour\n"); + for(i=0; i < pas; i++) + printf("\t%d\t%d\t%d\t%d\t%d\t%d\n", tNoCarte[i], tage[i], tPointsCarte[i], tCarteActive[i], tNbActivitesJour[i], tDate[i], &tmax); } + int main(void) { - + testOuverture(); return 0; } \ No newline at end of file