|
|
@ -273,11 +273,12 @@ Filecand ChargementfileC(Filecand fC, int *nbC)//chargement du fichier dans cett
|
|
|
|
return fC;
|
|
|
|
return fC;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int chargement (Candidat tCandAcc[], int tmax, FILEfe){// chargement des files cand et chx
|
|
|
|
int chargement (Candidat tCandAcc[], int tmax, FILE *fe){// chargement des files cand et chx
|
|
|
|
int i;
|
|
|
|
int i, nbCand;
|
|
|
|
|
|
|
|
Candidat c;
|
|
|
|
Choix chx;
|
|
|
|
Choix chx;
|
|
|
|
|
|
|
|
|
|
|
|
fscanf( fe, "%d", nbCand );
|
|
|
|
fscanf( fe, "%d", &nbCand );
|
|
|
|
|
|
|
|
|
|
|
|
c = lireCa (fe);
|
|
|
|
c = lireCa (fe);
|
|
|
|
|
|
|
|
|
|
|
@ -291,7 +292,7 @@ int chargement (Candidat tCandAcc[], int tmax, FILEfe){// chargement des files c
|
|
|
|
printf("Problème malloc\n");
|
|
|
|
printf("Problème malloc\n");
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*tCandAcc[i] = c;
|
|
|
|
tCandAcc[i] = c;
|
|
|
|
fscanf( fe, "%d", &nbC);
|
|
|
|
fscanf( fe, "%d", &nbC);
|
|
|
|
for ( i=0 ; i<nbc ; i ++){
|
|
|
|
for ( i=0 ; i<nbc ; i ++){
|
|
|
|
chx = lireC( fe );
|
|
|
|
chx = lireC( fe );
|
|
|
@ -308,7 +309,7 @@ int chargement (Candidat tCandAcc[], int tmax, FILEfe){// chargement des files c
|
|
|
|
void test (void){
|
|
|
|
void test (void){
|
|
|
|
FILE *fe;
|
|
|
|
FILE *fe;
|
|
|
|
int menu1, tlog;
|
|
|
|
int menu1, tlog;
|
|
|
|
CandidattCand[120];
|
|
|
|
Candidat *tCand[120];
|
|
|
|
|
|
|
|
|
|
|
|
fe = fopen( "part4.don", "r");
|
|
|
|
fe = fopen( "part4.don", "r");
|
|
|
|
if ( fe == NULL ){
|
|
|
|
if ( fe == NULL ){
|
|
|
@ -321,6 +322,7 @@ void test (void){
|
|
|
|
fC = ChargementfileC(fC, &nbC);
|
|
|
|
fC = ChargementfileC(fC, &nbC);
|
|
|
|
|
|
|
|
|
|
|
|
tlog = chargement (tCand, 120, fe);
|
|
|
|
tlog = chargement (tCand, 120, fe);
|
|
|
|
|
|
|
|
|
|
|
|
Afftab(tCand, tlog);
|
|
|
|
Afftab(tCand, tlog);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|