You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
819 B

#include "Fonctions.h"
int Sauvegarde(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[], int tNbActivitesJour[], int tDate[], int nbelem)
{
int i, j;
FILE *flot, *jour;
flot = fopen("membres.don", "a");
jour = fopen("ActivitesJour.don", "a");
if (flot == NULL)
{
printf("Pb d'ouverture du fichier membres.don\n");
return -1;
}
if (jour == NULL)
{
printf("Pb d'ouverture du fichier ActivitesJour.don\n");
return -1;
}
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]);
}
for (j = 0; j < (nbelem - 1); j++)
{
fprintf(jour, "%d\t\t%d\n", tDate[j], tNbActivitesJour[j]);
}
fclose(jour);
fclose(flot);
}