I just have a loop that returns to the start if a invalid option has been entered
do{
printf("Please enter a option, Press 'q' to quit\n");
scanf("%d",&option);
if(option == 1){
option1(...);
break;
}else if(option == 2){
option1(...);
break;
}else if(option == 3){
option1(...);
break;
}else if(option == false){
printf("exit\n");
exit(EXIT_SUCCESS);
}else{
continue;
}
} while(true);
My problem is
If I run it and enter a input eg: '5' it returns to the start of the do statement and I have to enter another input.
If I enter 'q' to quit the loop goes crazy and keeps repeating itself.
option? And why are you comparing it tofalse?