@ -7,30 +7,44 @@
int main ( ) {
int n , nc , codeErr , rootChoice = 1 , choix ;
char sauv ;
VilleIUT * tiut [ 200 ] ;
Candidat * tcandidat [ 200 ] ;
//Affichage plus propre en effaçant l'historique du terminal
system ( " cls " ) ; // pour Windows
system ( " clear " ) ; // pour Unix
n = chargement ( tiut , 200 ) ;
printf ( " Nombre de villes : %d \n " , n ) ;
printf ( " ============================================================== \n " ) ;
printf ( " \n \t Nombre de villes : %d \t " , n ) ;
nc = chargementcandidat ( tcandidat , 200 ) ;
printf ( " \n Nombre de candidat : %d \n " , nc ) ;
while ( rootChoice = = 1 ) {
system ( " cls " ) ; // pour Windows
system ( " clear " ) ; // pour Unix
printf ( " Nombre de candidat : %d \n " , nc ) ;
while ( rootChoice = = 1 ) { /*
printf ( " \t \t Tableau Ville et departement \n " ) ;
printf ( " \n Nombre de villes : %d \n " , n ) ;
affichage ( tiut , n ) ;
printf ( " \n \n \n \t \t Tableau Candidat et choix \n " ) ;
printf ( " \n Nombre de candidat : %d \n " , nc ) ;
affichageCandidatchoix ( tcandidat , nc ) ;
printf ( " \n \n Utilisateur - 1 \t Administrateur - 2 \t Candidat - 3 \t Responsable - 4 \t Sauvegarder et quitter - 5 \n : " ) ;
affichageCandidatchoix ( tcandidat , nc ) ; */
printf ( " \n >--------------------------------------< \n " ) ;
printf ( " \n \t 1 - Utilisateur / Invité " ) ;
printf ( " \n \t 2 - Administrateur " ) ;
printf ( " \n \t 3 - Candidat " ) ;
printf ( " \n \t 4 - Responsable " ) ;
printf ( " \n \t 5 - Sauvegarder et quitter \n " ) ;
printf ( " \n >--------------------------------------< \n " ) ;
printf ( " \n \t Votre choix : " ) ;
scanf ( " %d " , & choix ) ;
if ( choix = = 1 ) {
printf ( " \n Menu Utilisateur " ) ;
//Menu Utilisateur
system ( " cls " ) ;
system ( " clear " ) ;
MenuUtilisateur ( tiut , n ) ;
}
if ( choix = = 2 ) {
printf ( " \n Menu Administrateur " ) ;
//Menu Administrateur
system ( " cls " ) ;
system ( " clear " ) ;
MenuAdministrateur ( tiut , n ) ;
}
if ( choix = = 3 ) {
@ -51,5 +65,7 @@ int main(){
rootChoice = 0 ;
}
system ( " cls " ) ;
system ( " clear " ) ;
}
}