diff --git a/Affichage.c b/Affichage.c index 92bd31a..84038f2 100644 --- a/Affichage.c +++ b/Affichage.c @@ -1,15 +1,15 @@ #include "Fonctions.h" -void Affichage1Adherent(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int nbelem) +void Affichage1Adherent(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int nbElem) { - int pas, NoCarte, CarteActive, trouve; + int pas, noCarte, CarteActive, trouve; printf("Entrez le numéro de la carte de l'adhérent recherché : "); - scanf("%d", &NoCarte); - pas = rechercheAdherent(tNoCarte, nbelem, NoCarte, &trouve); + scanf("%d", &noCarte); + pas = RechercheAdherent(tNoCarte, nbElem, noCarte, &trouve); if (trouve == 1) { printf("\nN° de carte\tAge\tPoints\tEtat\n"); - printf("%d\t%d\t%d\t%d\n", tNoCarte[pas], tage[pas], tPointsCarte[pas], tCarteActive[pas]); + printf("%d\t%d\t%d\t%d\n", tNoCarte[pas], tAge[pas], tPointsCarte[pas], tCarteActive[pas]); } else { @@ -18,40 +18,40 @@ void Affichage1Adherent(int tNoCarte[], int tage[], int tPointsCarte[], int tCar } } -void AffichageTousAdherents(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int nbelem) +void AffichageTousAdherents(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int nbElem) { int i; printf("\nN° de carte\tAge\tPoints\tEtat\n"); - for (i = 0; i < nbelem; i++) + for (i = 0; i < nbElem; i++) { - printf("%d\t\t%d\t%d\t%d\n", tNoCarte[i], tage[i], tPointsCarte[i], tCarteActive[i]); + printf("%d\t\t%d\t%d\t%d\n", tNoCarte[i], tAge[i], tPointsCarte[i], tCarteActive[i]); } } -void AffichageNbEntreesTousJour(int tNbActivitesJour[], int tDate[], int nbelem) +void AffichageNbEntreesTousJour(int tNbActivitesJour[], int tDate[], int nbElem) { int i; printf("\nDate\tNb activités\n"); - for (i = 0; i < nbelem; i++) + for (i = 0; i < nbElem; i++) { printf("%d\t%d\n", tDate[i], tNbActivitesJour[i]); } } -void AffichageNbEntreesTotal(int tNbActivitesJour[], int nbelem) +void AffichageNbEntreesTotal(int tNbActivitesJour[], int nbElem) { int i, somme = 0; - for (i = 0; i < nbelem; i++) + for (i = 0; i < nbElem; i++) { somme = somme + tNbActivitesJour[i]; } printf("Le nombre total d'entrées est de %d depuis le début.\n", somme); } -void AffichageNbAdherents(int nbelem) +void AffichageNbAdherents(int nbElem) { int i, somme = 0; - for (i = 0; i < nbelem; i++) + for (i = 0; i < nbElem; i++) { somme = somme + 1; } diff --git a/Fonctions.h b/Fonctions.h index 18a6b44..b1b7aca 100644 --- a/Fonctions.h +++ b/Fonctions.h @@ -2,34 +2,34 @@ #include /* Fonctions d'ouverture des fichiers texte */ -int Ouverture(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int tmax, int *pasAct); -int OuvertureMembres(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tmax); -int OuvertureActivitesJour(int tNbActivitesJour[], int tDate[], int tmax); +int Ouverture(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int tMax, int *pasAct); +int OuvertureMembres(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int tMax); +int OuvertureActivitesJour(int tNbActivitesJour[], int tDate[], int tMax); /* Fonctions des menus */ -int choixMenu(void); -int choixMenuAffichage(void); +int ChoixMenu(void); +int ChoixMenuAffichage(void); /* Fonctions d'affichage */ -void Affichage1Adherent(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int nbelem); -void AffichageTousAdherents(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int nbelem); -void AffichageNbEntreesTousJour(int tNbActivitesJour[], int tDate[], int nbelem); -void AffichageNbEntreesTotal(int tNbActivitesJour[], int nbelem); -void AffichageNbAdherents(int nbelem); +void Affichage1Adherent(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int nbElem); +void AffichageTousAdherents(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int nbElem); +void AffichageNbEntreesTousJour(int tNbActivitesJour[], int tDate[], int nbElem); +void AffichageNbEntreesTotal(int tNbActivitesJour[], int nbElem); +void AffichageNbAdherents(int nbElem); /* Fonction globale */ -void gestionMenus(void); +void GestionMenus(void); /* Fonction de sauvegarde */ -int Sauvegarde(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int nbelem); +int Sauvegarde(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int nbElem); /* Fonctions de gestion des adhérents */ -int rechercheAdherent(int tNoCarte[], int nbelem, int NoCarte, int *trouve); -int AjoutAdherent(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tmax, int nbelem); -void ModificationAge(int tNoCarte[], int tage[], int nbelem); -int SupprimmerAdherent(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int nbelem); -void ModificationActivationCarte(int tNoCarte[], int tCarteActive[], int nbelem); +int RechercheAdherent(int tNoCarte[], int nbElem, int NoCarte, int *trouve); +int AjoutAdherent(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int tMax, int nbElem); +void ModificationAge(int tNoCarte[], int tAge[], int nbElem); +int SupprimerAdherent(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int nbElem); +void ModificationActivationCarte(int tNoCarte[], int tCarteActive[], int nbElem); /* Fonctions de gestion des points */ -void AjoutPoints(int tNoCarte[], int tPointsCarte[], int tCarteActive[], int nbelem); -void DebitActivitee(int tNoCarte[], int tCarteActive[], int tNbActivitesJour[], int nbelem); \ No newline at end of file +void AjoutPoints(int tNoCarte[], int tPointsCarte[], int tCarteActive[], int nbElem); +void DebitActivitee(int tNoCarte[], int tCarteActive[], int tNbActivitesJour[], int nbElem); \ No newline at end of file diff --git a/GestionAdherents.c b/GestionAdherents.c index e89a4fe..2ee8176 100644 --- a/GestionAdherents.c +++ b/GestionAdherents.c @@ -1,16 +1,16 @@ #include "Fonctions.h" -int rechercheAdherent(int tNoCarte[], int nbelem, int NoCarte, int *trouve) +int RechercheAdherent(int tNoCarte[], int nbElem, int noCarte, int *trouve) { int i; - for (i = 0; i < nbelem; i++) + for (i = 0; i < nbElem; i++) { - if (tNoCarte[i] == NoCarte) + if (tNoCarte[i] == noCarte) { *trouve = 1; return i; } - if (tNoCarte[i] > NoCarte) + if (tNoCarte[i] > noCarte) { *trouve = 0; return i + 1; @@ -18,59 +18,59 @@ int rechercheAdherent(int tNoCarte[], int nbelem, int NoCarte, int *trouve) } } -int AjoutAdherent(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tmax, int nbelem) +int AjoutAdherent(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int tMax, int nbElem) { - int NoCarte, age, pointsCarte, CarteActive, pas, trouve, j; + int noCarte, age, pointsCarte, pas, trouve, j; char reponse; printf("Vous voulez créer un nouvel adhérent.\n"); printf("Donnez l'âge de l'adhérent : "); scanf("%d", &age); - pas = rechercheAdherent(tNoCarte, nbelem, NoCarte, &trouve); + pas = RechercheAdherent(tNoCarte, nbElem, noCarte, &trouve); printf("%d\n", pas); - for (j = nbelem; j > pas; j--) + for (j = nbElem; j > pas; j--) { - if (j == tmax) + if (j == tMax) { printf("Tableau plein, impossible d'ajouter un adhérent.\n"); return -1; } tNoCarte[j] = tNoCarte[j - 1]; - tage[j] = tage[j - 1]; + tAge[j] = tAge[j - 1]; tPointsCarte[j] = tPointsCarte[j - 1]; tCarteActive[j] = tCarteActive[j - 1]; } tNoCarte[pas] = pas + 1; printf("%d\n", tNoCarte[pas]); - tage[pas] = age; + tAge[pas] = age; tPointsCarte[pas] = 0; tCarteActive[pas] = 0; - nbelem++; - printf("Vous avez créé l'adhérent numéro %d. Il a %d ans.\nSa carte n'est pas active car il n'y a pas de points dessus.\nVoulez-vous en ajouter ? (o/n)\n", tNoCarte[pas], tage[pas]); + nbElem++; + printf("Vous avez créé l'adhérent numéro %d. Il a %d ans.\nSa carte n'est pas active car il n'y a pas de points dessus.\nVoulez-vous en ajouter ? (o/n)\n", tNoCarte[pas], tAge[pas]); scanf("%*c%c", &reponse); if (reponse == 'O' || reponse == 'o') { - AjoutPoints(tNoCarte, tPointsCarte, tCarteActive, nbelem); + AjoutPoints(tNoCarte, tPointsCarte, tCarteActive, nbElem); } else { printf("La carte n'est pas active.\n"); - return nbelem; + return nbElem; } - return nbelem; + return nbElem; } -void ModificationAge(int tNoCarte[], int tage[], int nbelem) +void ModificationAge(int tNoCarte[], int tAge[], int nbElem) { - int pas, NoCarte, age, trouve; + int pas, noCarte, age, trouve; printf("Entrez le numéro de la carte de l'adhérent recherché : "); - scanf("%d", &NoCarte); - pas = rechercheAdherent(tNoCarte, nbelem, NoCarte, &trouve); + scanf("%d", &noCarte); + pas = RechercheAdherent(tNoCarte, nbElem, noCarte, &trouve); if (trouve == 1) { printf("Entrez le nouvel âge de l'adhérent : "); scanf("%d", &age); - tage[pas] = age; - printf("Vous avez modifié l'âge de l'adhérent numéro %d. Son nouvel âge est %d.\n", NoCarte, age); + tAge[pas] = age; + printf("Vous avez modifié l'âge de l'adhérent numéro %d. Son nouvel âge est %d.\n", noCarte, age); } else { @@ -79,24 +79,24 @@ void ModificationAge(int tNoCarte[], int tage[], int nbelem) } } -int SupprimmerAdherent(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int nbelem) +int SupprimerAdherent(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int nbElem) { - int pas, i, NoCarte, trouve; + int pas, i, noCarte, trouve; printf("Entrez le numéro de la carte de l'adhérent recherché : "); - scanf("%d", &NoCarte); - pas = rechercheAdherent(tNoCarte, nbelem, NoCarte, &trouve); + scanf("%d", &noCarte); + pas = RechercheAdherent(tNoCarte, nbElem, noCarte, &trouve); if (trouve == 1) { - for (i = pas; i < nbelem; i++) + for (i = pas; i < nbElem; i++) { tNoCarte[i] = tNoCarte[i + 1]; - tage[i] = tage[i + 1]; + tAge[i] = tAge[i + 1]; tPointsCarte[i] = tPointsCarte[i + 1]; tCarteActive[i] = tCarteActive[i + 1]; } - nbelem = nbelem - 1; - printf("Vous avez bien supprimé l'adhérent numéro %d.\n", NoCarte); - return nbelem; + nbElem = nbElem - 1; + printf("Vous avez bien supprimé l'adhérent numéro %d.\n", noCarte); + return nbElem; } else { @@ -105,12 +105,12 @@ int SupprimmerAdherent(int tNoCarte[], int tage[], int tPointsCarte[], int tCart } } -void ModificationActivationCarte(int tNoCarte[], int tCarteActive[], int nbelem) +void ModificationActivationCarte(int tNoCarte[], int tCarteActive[], int nbElem) { - int NoCarte, trouve, pas, choix, choixRaison; + int noCarte, trouve, pas, choix, choixRaison; printf("Entrez le numéro de la carte de l'adhérent recherché : "); - scanf("%d", &NoCarte); - pas = rechercheAdherent(tNoCarte, nbelem, NoCarte, &trouve); + scanf("%d", &noCarte); + pas = RechercheAdherent(tNoCarte, nbElem, noCarte, &trouve); if (trouve == 1) { printf("\nQue voulez-vous faire ?\n1.\tActiver la carte\n2.\tDésactiver la carte\n"); @@ -128,7 +128,7 @@ void ModificationActivationCarte(int tNoCarte[], int tCarteActive[], int nbelem) return; } tCarteActive[pas] = 1; - printf("La carte numéro %d est désormais activée.\n", NoCarte); + printf("La carte numéro %d est désormais activée.\n", noCarte); } else if (choix == 2) { @@ -142,7 +142,7 @@ void ModificationActivationCarte(int tNoCarte[], int tCarteActive[], int nbelem) return; } tCarteActive[pas] = 0; - printf("La carte numéro %d est désormais désactivée.\n", NoCarte); + printf("La carte numéro %d est désormais désactivée.\n", noCarte); } } else diff --git a/GestionPoints.c b/GestionPoints.c index 297d096..0e5b5d0 100644 --- a/GestionPoints.c +++ b/GestionPoints.c @@ -1,11 +1,11 @@ #include "Fonctions.h" -void AjoutPoints(int tNoCarte[], int tPointsCarte[], int tCarteActive[], int nbelem) +void AjoutPoints(int tNoCarte[], int tPointsCarte[], int tCarteActive[], int nbElem) { - int pointsCarte, NoCarte, trouve, pas; + int pointsCarte, noCarte, trouve, pas; printf("Entrez le numéro de la carte de l'adhérent recherché : "); - scanf("%d", &NoCarte); - pas = rechercheAdherent(tNoCarte, nbelem, NoCarte, &trouve); + scanf("%d", &noCarte); + pas = RechercheAdherent(tNoCarte, nbElem, noCarte, &trouve); if (trouve == 1) { printf("Entrez le nombre de points à ajouter : "); @@ -48,13 +48,13 @@ void AjoutPoints(int tNoCarte[], int tPointsCarte[], int tCarteActive[], int nbe } } -void DebitActivitee(int tNoCarte[], int tCarteActive[], int tNbActivitesJour[], int nbelem) +void DebitActivitee(int tNoCarte[], int tCarteActive[], int tNbActivitesJour[], int nbElem) { - int NoCarte, trouve, pas, pointsCarte; + int noCarte, trouve, pas, pointsCarte; char reponse; printf("Entrez le numéro de la carte de l'adhérent recherché : "); - scanf("%d", &NoCarte); - pas = rechercheAdherent(tNoCarte, nbelem, NoCarte, &trouve); + scanf("%d", &noCarte); + pas = RechercheAdherent(tNoCarte, nbElem, noCarte, &trouve); if (trouve == 1) { if (tCarteActive[pas] == 1) diff --git a/Global.c b/Global.c index 464d6bb..e4375c6 100644 --- a/Global.c +++ b/Global.c @@ -21,76 +21,76 @@ Votre application doit pouvoir interdire à un adhérent de fréquenter le centr */ -void gestionMenus(void) +void GestionMenus(void) { - int tNoCarte[20] = {0}, tage[20] = {0}, tPointsCarte[20] = {0}, tCarteActive[20] = {0}; + int tNoCarte[20] = {0}, tAge[20] = {0}, tPointsCarte[20] = {0}, tCarteActive[20] = {0}; int tDate[20] = {0}, tNbActivitesJour[20] = {0}; - int tmax = 20, nbelem, choix, pasAct; + int tMax = 20, nbElem, choix, pasAct; char choixA; - nbelem = Ouverture(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, tmax, &pasAct); - if (nbelem < 0) + nbElem = Ouverture(tNoCarte, tAge, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, tMax, &pasAct); + if (nbElem < 0) { printf("Erreur d'ouverture du fichier ou tableau plein !!!\n"); return; } - choix = choixMenu(); + choix = ChoixMenu(); while (choix != 8) { if (choix == 1) { - choixA = choixMenuAffichage(); + choixA = ChoixMenuAffichage(); while (choixA != 'F' && choixA != 'f') { if (choixA == 'A' || choixA == 'a') { - Affichage1Adherent(tNoCarte, tage, tPointsCarte, tCarteActive, nbelem); + Affichage1Adherent(tNoCarte, tAge, tPointsCarte, tCarteActive, nbElem); } if (choixA == 'B' || choixA == 'b') { - AffichageTousAdherents(tNoCarte, tage, tPointsCarte, tCarteActive, nbelem); + AffichageTousAdherents(tNoCarte, tAge, tPointsCarte, tCarteActive, nbElem); } if (choixA == 'C' || choixA == 'c') { - AffichageNbEntreesTousJour(tNbActivitesJour, tDate, nbelem); + AffichageNbEntreesTousJour(tNbActivitesJour, tDate, nbElem); } if (choixA == 'D' || choixA == 'd') { - AffichageNbEntreesTotal(tNbActivitesJour, nbelem); + AffichageNbEntreesTotal(tNbActivitesJour, nbElem); } if (choixA == 'E' || choixA == 'e') { - AffichageNbAdherents(nbelem); + AffichageNbAdherents(nbElem); } - choixA = choixMenuAffichage(); + choixA = ChoixMenuAffichage(); } } if (choix == 2) { - nbelem = AjoutAdherent(tNoCarte, tage, tPointsCarte, tCarteActive, tmax, nbelem); + nbElem = AjoutAdherent(tNoCarte, tAge, tPointsCarte, tCarteActive, tMax, nbElem); } if (choix == 3) { - ModificationAge(tNoCarte, tage, nbelem); + ModificationAge(tNoCarte, tAge, nbElem); } if (choix == 4) { - nbelem = SupprimmerAdherent(tNoCarte, tage, tPointsCarte, tCarteActive, nbelem); + nbElem = SupprimerAdherent(tNoCarte, tAge, tPointsCarte, tCarteActive, nbElem); } if (choix == 5) { - AjoutPoints(tNoCarte, tPointsCarte, tCarteActive, nbelem); + AjoutPoints(tNoCarte, tPointsCarte, tCarteActive, nbElem); } if (choix == 6) { - ModificationActivationCarte(tNoCarte, tCarteActive, nbelem); + ModificationActivationCarte(tNoCarte, tCarteActive, nbElem); } if (choix == 7) { - DebitActivitee(tNoCarte, tCarteActive, tNbActivitesJour, nbelem); + DebitActivitee(tNoCarte, tCarteActive, tNbActivitesJour, nbElem); } - choix = choixMenu(); + choix = ChoixMenu(); } - Sauvegarde(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, nbelem); + Sauvegarde(tNoCarte, tAge, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, nbElem); exit(1); } \ No newline at end of file diff --git a/Menus.c b/Menus.c index 1694df3..d061b29 100644 --- a/Menus.c +++ b/Menus.c @@ -1,6 +1,6 @@ #include "Fonctions.h" -int choixMenu(void) +int ChoixMenu(void) { int choix; printf("\n\tMenu principal\n"); @@ -17,7 +17,7 @@ int choixMenu(void) return choix; } -int choixMenuAffichage(void) +int ChoixMenuAffichage(void) { char choix; printf("\n\tMenu d'affichage\n"); diff --git a/Ouverture.c b/Ouverture.c index cd2b4c5..2172750 100644 --- a/Ouverture.c +++ b/Ouverture.c @@ -1,17 +1,17 @@ #include "Fonctions.h" -int Ouverture(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int tmax, int *pasAct) +int Ouverture(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int tMax, int *pasAct) { int pasMembres; - pasMembres = OuvertureMembres(tNoCarte, tage, tPointsCarte, tCarteActive, tmax); - *pasAct = OuvertureActivitesJour(tNbActivitesJour, tDate, tmax); + pasMembres = OuvertureMembres(tNoCarte, tAge, tPointsCarte, tCarteActive, tMax); + *pasAct = OuvertureActivitesJour(tNbActivitesJour, tDate, tMax); return pasMembres; } -int OuvertureMembres(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tmax) +int OuvertureMembres(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int tMax) { int i = 0; - int NoCarte, age, pointsCarte, CarteActive; + int noCarte, age, pointsCarte, carteActive; FILE *flot; flot = fopen("membres.don", "r"); if (flot == NULL) @@ -19,30 +19,30 @@ int OuvertureMembres(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteA printf("Problème d'ouverture du fichier membres.don en lecture.\n"); return -1; } - fscanf(flot, "%d%d%d%d", &NoCarte, &age, &pointsCarte, &CarteActive); + fscanf(flot, "%d%d%d%d", &noCarte, &age, &pointsCarte, &carteActive); while (!feof(flot)) { - if (i == tmax) + if (i == tMax) { printf("Tableau plein.\n"); fclose(flot); return -1; } - tNoCarte[i] = NoCarte; - tage[i] = age; + tNoCarte[i] = noCarte; + tAge[i] = age; tPointsCarte[i] = pointsCarte; - tCarteActive[i] = CarteActive; - fscanf(flot, "%d%d%d%d", &NoCarte, &age, &pointsCarte, &CarteActive); + tCarteActive[i] = carteActive; + fscanf(flot, "%d%d%d%d", &noCarte, &age, &pointsCarte, &carteActive); i++; } fclose(flot); return i; } -int OuvertureActivitesJour(int tNbActivitesJour[], int tDate[], int tmax) +int OuvertureActivitesJour(int tNbActivitesJour[], int tDate[], int tMax) { int i = 0; - int Date, nbActivitesJour; + int date, nbActivitesJour; FILE *jour; jour = fopen("ActivitesJour.don", "r"); if (jour == NULL) @@ -50,18 +50,18 @@ int OuvertureActivitesJour(int tNbActivitesJour[], int tDate[], int tmax) printf("Problème d'ouverture du fichier ActivitesJour.don en lecture.\n"); return -1; } - fscanf(jour, "%d%d", &Date, &nbActivitesJour); + fscanf(jour, "%d%d", &date, &nbActivitesJour); while (!feof(jour)) { - if (i == tmax) + if (i == tMax) { printf("Tableau plein.\n"); fclose(jour); return -1; } - tDate[i] = Date; + tDate[i] = date; tNbActivitesJour[i] = nbActivitesJour; - fscanf(jour, "%d%d", &Date, &nbActivitesJour); + fscanf(jour, "%d%d", &date, &nbActivitesJour); i++; } fclose(jour); diff --git a/Sauvegarde.c b/Sauvegarde.c index a8767de..1ecb4fb 100644 --- a/Sauvegarde.c +++ b/Sauvegarde.c @@ -1,6 +1,6 @@ #include "Fonctions.h" -int Sauvegarde(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int nbelem) +int Sauvegarde(int tNoCarte[], int tAge[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int nbElem) { int i, j; FILE *flot, *jour; @@ -16,11 +16,11 @@ int Sauvegarde(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[ printf("Problème d'ouverture du fichier ActivitesJour.don en écriture.\n"); return -1; } - for (i = 0; i < (nbelem - 1); i++) + for (i = 0; i < (nbElem - 1); i++) { - fprintf(flot, "\t%d\t%d\t\t%d\t\t%d\n", tNoCarte[i], tage[i], tPointsCarte[i], tCarteActive[i]); + fprintf(flot, "\t%d\t%d\t\t%d\t\t%d\n", tNoCarte[i], tAge[i], tPointsCarte[i], tCarteActive[i]); } - for (j = 0; j < (nbelem - 1); j++) + for (j = 0; j < (nbElem - 1); j++) { fprintf(jour, "%d\t\t%d\n", tDate[j], tNbActivitesJour[j]); } diff --git a/main.c b/main.c index 55d7707..cee3edd 100644 --- a/main.c +++ b/main.c @@ -23,6 +23,6 @@ int main(void) { //testOuverture(); //testSauvegarde(); - gestionMenus(); + GestionMenus(); return 0; } \ No newline at end of file