Menu non-stoppable (ajout while)

doc
Rémi LAVERGNE 2 years ago
parent 4cf977f459
commit eaf545a014

@ -18,6 +18,7 @@ int displayMenu(void)
printf("2. \u25B6 Inscription\n");
printf("3. \u25B6 Faire opposition\n");
printf("4. \u274C Quitter\n");
printf("9. \u26A0 Débug\n");
printf("=================================\n");
printf("Votre choix : ");
scanf("%d", &choice);
@ -50,22 +51,30 @@ void global(void)
// Affichage du menu
choice = displayMenu();
switch (choice)
while (choice != 4)
{
case 1:
//TODO > Connexion
choice = displayMenu();
case 2:
//TODO > Inscription
choice = displayMenu();
case 3:
//TODO > Faire opposition
choice = displayMenu();
case 4:
return;
default:
printf("Erreur, veuillez entrer un choix valide.\n");
choice = displayMenu();
choice = displayMenu();
switch (choice)
{
case 1:
//TODO > Connexion
break;
case 2:
//TODO > Inscription
break;
case 3:
//TODO > Faire opposition
break;
case 4:
return;
case 9:
printf("Temp");
break;
default:
printf("Erreur, veuillez entrer un choix valide.\n");
choice = displayMenu();
break;
}
}
}

Loading…
Cancel
Save