Name: Anonymous 2010-10-05 19:18
I'm trying to debug my program can anybody help?
Here's a part of the code
cin >> order;
while(order!=1 && order!=2 && order!=3){
cout << "Invalid input, please input valid input"<< endl;
cin >> order;
When I enter negatives and 0 it works fine, but when I enter letters it goes into an infinite loop of "Invalid input, please input valid input". Any way I can fix this?
Here's a part of the code
cin >> order;
while(order!=1 && order!=2 && order!=3){
cout << "Invalid input, please input valid input"<< endl;
cin >> order;
When I enter negatives and 0 it works fine, but when I enter letters it goes into an infinite loop of "Invalid input, please input valid input". Any way I can fix this?