Please look at my code:
int get_menu_choice (void);
int main ()
choice = get_menu_choice();
printf("you chose menu option %d\n", choice);
int get_menu_choice (void)
unsigned int selection;
printf("\n1 - add record");
printf("\n2 - change record");
printf("\n3 - Delete a record");
printf("\n4 - Quit");
printf("\nEnter a selection: ");
while (selection < 1 || selection > 4);
return selection ;
when a char is entered as a menu choice i get crazy output. Is there a simple way that i can stop this from happening?
I've tried adding if statements, etc but nothing has seemed to work.
Can anyone please help me thanku.