Amélioration de l'affichage et de la lisibilité du code

master
Kyllian CHABANON 2 years ago
parent e70c390f62
commit 040b390670

@ -16,7 +16,7 @@ int OuvertureMembres(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteA
flot = fopen("membres.don", "r"); flot = fopen("membres.don", "r");
if (flot == NULL) if (flot == NULL)
{ {
printf("Pb d'ouverture du fichier membres.don\n"); printf("Problème d'ouverture du fichier membres.don en lecture.\n");
return -1; return -1;
} }
fscanf(flot, "%d%d%d%d", &NoCarte, &age, &pointsCarte, &CarteActive); fscanf(flot, "%d%d%d%d", &NoCarte, &age, &pointsCarte, &CarteActive);
@ -24,7 +24,7 @@ int OuvertureMembres(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteA
{ {
if (i == tmax) if (i == tmax)
{ {
printf("Tableau plein\n"); printf("Tableau plein.\n");
fclose(flot); fclose(flot);
return -1; return -1;
} }
@ -47,7 +47,7 @@ int OuvertureActivitesJour(int tNbActivitesJour[], int tDate[], int tmax)
jour = fopen("ActivitesJour.don", "r"); jour = fopen("ActivitesJour.don", "r");
if (jour == NULL) if (jour == NULL)
{ {
printf("Pb d'ouverture du fichier ActivitesJour.don\n"); printf("Problème d'ouverture du fichier ActivitesJour.don en lecture.\n");
return -1; return -1;
} }
fscanf(jour, "%d%d", &Date, &nbActivitesJour); fscanf(jour, "%d%d", &Date, &nbActivitesJour);
@ -55,7 +55,7 @@ int OuvertureActivitesJour(int tNbActivitesJour[], int tDate[], int tmax)
{ {
if (i == tmax) if (i == tmax)
{ {
printf("Tableau plein\n"); printf("Tableau plein.\n");
fclose(jour); fclose(jour);
return -1; return -1;
} }

@ -8,12 +8,12 @@ int Sauvegarde(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[
jour = fopen("ActivitesJour.don", "a"); jour = fopen("ActivitesJour.don", "a");
if (flot == NULL) if (flot == NULL)
{ {
printf("Pb d'ouverture du fichier membres.don\n"); printf("Problème d'ouverture du fichier membres.don en écriture.\n");
return -1; return -1;
} }
if (jour == NULL) if (jour == NULL)
{ {
printf("Pb d'ouverture du fichier ActivitesJour.don\n"); printf("Problème d'ouverture du fichier ActivitesJour.don en écriture.\n");
return -1; return -1;
} }
for (i = 0; i < (nbelem - 1); i++) for (i = 0; i < (nbelem - 1); i++)

Loading…
Cancel
Save