DahmaneYanis 2 years ago
commit 44a8a5eb43

@ -125,6 +125,7 @@ int modifieRespDept(VilleIut *tVilleIut[], int nbVilles, char ville[], char nomD
void afficheIUTDept(VilleIut* *villeIut, int nbVilles, char *nomDept); void afficheIUTDept(VilleIut* *villeIut, int nbVilles, char *nomDept);
void afficheVillesIUT(VilleIut **villeIut, int nbVilles); void afficheVillesIUT(VilleIut **villeIut, int nbVilles);
void afficheNbPlacesDep(VilleIut *tVilleIut[], int nbVilles, char nomDept[]); void afficheNbPlacesDep(VilleIut *tVilleIut[], int nbVilles, char nomDept[]);
int existeVille( VilleIut * tIut[], char ville[], int nbvilles );
void menuAdmin(VilleIut **villeIut, int nbVilles); void menuAdmin(VilleIut **villeIut, int nbVilles);
void afficherCandidat(Candidat candidat); void afficherCandidat(Candidat candidat);

@ -596,6 +596,18 @@ void afficheNbPlacesDep(VilleIut *tVilleIut[], int nbVilles, char nomDept[])
} }
} }
int existeVille( VilleIut * tIut[], char ville[], int nbvilles )
{
int i = 0;
//recherche de la ville
for( e = 0; i < nbvilles; i ++ )
{
if ( strcmp( tIut[i] -> nom, ville ) == 0 ) return i; // ville trouvée...
}
return -1;
}
/** /**
* Affiche et gère le menu administrateur. * Affiche et gère le menu administrateur.
* *
@ -660,6 +672,11 @@ void menuAdmin(VilleIut **villeIut, int nbVilles)
} while (choix != 7); } while (choix != 7);
} }
/* /*
================================================ ================================================
Partie 2 Partie 2

Loading…
Cancel
Save