Okay It now loops correctly but when you give it an input e.g. '2' it just goes to the default case.
print_Menu() {
while ( 1 )
{
printf("=============================================\n");
printf("MENU\n");
printf("=============================================\n");
printf("1. Do stuff\n2. Do more stuff\n3. Do even more stuff\n4. Quit\n");
printf("Choose an option: ");
scanf(" %s*", &selection);
switch (selection) {
case 1:
/*do your thing for option 1*/
printf("thing 1\n");
break;
case 2:
/*do your thing for option 2*/
printf("thing 2\n");
break;
case 3:
/*do your thing for option 3*/
printf("thing 3\n");
break;
case 4:
/*do your thing for option 3*/
printf("quiting app\n");
exit(0);
break;
default:
printf(" Invalid selection\n");
// print_Menu();
break;
}
}