Please help me out!! URGENT,NEWBIE to C++....

void main()
{
int user;
// Splash();
do
{
clrscr();
cout<<"Please select one of the following options:\n";
cout<<"1.Issue a Book.\n2.Deposit a Book.\n3.Administrator Functions.\n4.Exit.\n";
cin>>user;
clrscr();
switch(user)
{
case '1': {Book_Issue();break; }
case '2': {Book_Deposit();break;}
case '3': {Admin();break;}
case '4': {cout<<"Thanks for using the Library.See you again Soon!\n";break;}
default:{gotoxy(26,12);cout<<"Wrong choice in Main.Please enter again.\n";getch();}
}
}while(user!=4);
getch();
}





This code, upon execution simply executes the default statement only, does not accept any other input.
Please point out the mistake.
Really Grateful for the support.
All other functions are defined.
You have an int, but you're using chars in your switch cases (type 49 and see what happens...).
It was still the same error without the apostrophes.....
Really sorry, upon execution, ERROR RESOLVED.
Thanks a ton!!!
As I said, NEWBIE...
Quite easily frustrated......
Topic archived. No new replies allowed.