#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("Problème d'ouverture du fichier membres.don en écriture.\n"); return -1; } if (jour == NULL) { printf("Problème d'ouverture du fichier ActivitesJour.don en écriture.\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); }