|
|
|
@ -136,7 +136,7 @@ void afficherCandidatures(Candidat* candidat) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ListeCandidats lireCandidats(int* nbCandidats) {
|
|
|
|
|
ListeCandidats readCandidats(int* nbCandidats) {
|
|
|
|
|
FILE *fe = fopen("donnees/candidats.don", "r");
|
|
|
|
|
|
|
|
|
|
if(fe == NULL) {
|
|
|
|
@ -205,7 +205,7 @@ int compareCandidats(const void* p1, const void* p2) {
|
|
|
|
|
return strcmp(nomComplet1, nomComplet2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int sauvegarderCandidats(ListeCandidats liste, int nbCandidats) {
|
|
|
|
|
int saveCandidats(ListeCandidats liste, int nbCandidats) {
|
|
|
|
|
FILE *fe = fopen("donnees/candidats.don", "w");
|
|
|
|
|
|
|
|
|
|
if(fe == NULL) {
|
|
|
|
@ -240,7 +240,7 @@ int sauvegarderCandidats(ListeCandidats liste, int nbCandidats) {
|
|
|
|
|
void test2(void) {
|
|
|
|
|
int nbCandidats;
|
|
|
|
|
//printf("pa kc");
|
|
|
|
|
ListeCandidats liste = lireCandidats(&nbCandidats);
|
|
|
|
|
ListeCandidats liste = readCandidats(&nbCandidats);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
afficherCandidat(liste[0]);
|
|
|
|
|