View Single Post
Old 10-16-2005, 06:39 PM   #1 (permalink)
bradleyc
Registered User
 
Join Date: Aug 2005
Posts: 17
bradleyc is on a distinguished road
What is wrong with this statement?

If i enter 1, 2, 3, 4 ... still returns "ERROR: Invaild Input"


Code:
      clrscr();
      cout << "     " << endl;
      cout << " Which event would you like to select? "<<endl;
      cout << "" << endl;
      cout << " 1. 100m Free" <<endl;
      cout << "" << endl;
      cout << " 2. 200m Back" <<endl;
      cout << "" << endl;
      cout << " 3. 400m Medley" <<endl;
      cout << "" << endl;
      cout << " 4. 800m Back" <<endl;
      cout << "" << endl;
      cout << " Your Selection: ";
      cin >> currentE;
      	if (currentE < '1' ||  currentE > '4')
         {
         	clrscr();
         	cout << " " << endl;
         	cout << " ERROR: Invaild Input" <<endl;
         	cout << " Press any key to exit ....";
         }
            	input = getch();
               if (input)
					{
        			swim::displayMenu();
					}
bradleyc is offline   Reply With Quote