|
|
@ -5,7 +5,7 @@ int Ouverture(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[]
|
|
|
|
int i = 0, j = 0;
|
|
|
|
int i = 0, j = 0;
|
|
|
|
int NoCarte, age, pointsCarte, CarteActive;
|
|
|
|
int NoCarte, age, pointsCarte, CarteActive;
|
|
|
|
int Date, nbActivitesJour;
|
|
|
|
int Date, nbActivitesJour;
|
|
|
|
FILE *flot *jour;
|
|
|
|
FILE *flot, *jour;
|
|
|
|
flot = fopen("membres.don", "r");
|
|
|
|
flot = fopen("membres.don", "r");
|
|
|
|
jour = fopen("ActivitesJour.don", "r");
|
|
|
|
jour = fopen("ActivitesJour.don", "r");
|
|
|
|
if(flot == NULL)
|
|
|
|
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");
|
|
|
|
printf("Pb d'ouverture du fichier ActivitesJour.don\n");
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fscanf(flot, "%d%d%d%d%d%d%d", &NoCarte, &nom, &prenom, &age, &pointsCarte, &CarteActive, &nbActivitéesJour);
|
|
|
|
fscanf(flot, "%d%d%d%d%d%d%d", &NoCarte, &age, &pointsCarte, &CarteActive);
|
|
|
|
fscanf(jour, "%d%d", &Date, &nbActivitéesJour);
|
|
|
|
fscanf(jour, "%d%d", &Date, &nbActivitesJour);
|
|
|
|
while(!feof(flot))
|
|
|
|
while(!feof(flot))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(i == tmax)
|
|
|
|
if(i == tmax)
|
|
|
@ -32,7 +32,7 @@ int Ouverture(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[]
|
|
|
|
tage[i] = age;
|
|
|
|
tage[i] = age;
|
|
|
|
tPointsCarte[i] = pointsCarte;
|
|
|
|
tPointsCarte[i] = pointsCarte;
|
|
|
|
tCarteActive[i] = CarteActive;
|
|
|
|
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++;
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
while(!feof(jour))
|
|
|
|
while(!feof(jour))
|
|
|
@ -43,16 +43,16 @@ int Ouverture(int tNoCarte[], int tage[], int tPointsCarte[], int tCarteActive[]
|
|
|
|
fclose(jour);
|
|
|
|
fclose(jour);
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Date[j] = Date;
|
|
|
|
tDate[j] = Date;
|
|
|
|
tNbActivitesJour[j] = nbActivitesJour;
|
|
|
|
tNbActivitesJour[j] = nbActivitesJour;
|
|
|
|
fscanf(jour, "%d%d", &Date, &nbActivitéesJour);
|
|
|
|
fscanf(jour, "%d%d", &Date, &nbActivitesJour);
|
|
|
|
j++;
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose(jour);
|
|
|
|
fclose(jour);
|
|
|
|
fclose(flot);
|
|
|
|
fclose(flot);
|
|
|
|
return i;
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
void pointsBonus()
|
|
|
|
void pointsBonus()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
@ -100,4 +100,4 @@ int FrequenceCentre()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|