Page 461 - C++
P. 461
if(strcmp(pass,word)==0)
{ char choice;
do{clrscr();
cout<<"\n\t\t\tWelcome to manager screen!!!\n\n Go
to:\n\n(1)Item's screen\n\n(2)Change password\n\n(3)Exit to previous
screen\n\n\t\t\tYour choice(1-3):";
choice=getch();
switch(choice)
{case '1': universal.screen();
break;
case '2': universal.change();
break;
case '3': break;
default : cout<<"\n\n\a Wrong choice! Enter again";
getch();
break;}
}while(choice!='3');
}
cout<<"\n\t\t Returning to main menu...";
getch();
}
//Main fn
void main()
{char choice;
do{clrscr();
cout<<"\n\t\t\t\t\b***************\n\t\t\t\t\b* ABC SWEETS
*\n\t\t\t\t\b***************\n\n\t\tShop no. 66 Vasant Kunj\n\t\tPh:
4040031, 32, 38, 39";
cout<<"\n\n\n Login
as:\n\n(1)Manager\n\n(2)Customer\n\n(3)Exit\n\t\t\t Your choice(1-3):";
choice=getch();
switch(choice)
{case '1': universal.manager();
break;
case '2': universal.customer();
break;
case '3':cout<<"\n\n\t\t\t Exiting...";
getch();
break;
default: cout<<"\n\n\a Wrong choice! Enter again";
getch();
break;}
}while(choice!='3');
}