Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

help debugging

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?

Name: Anonymous 2010-10-05 19:24

Learn the language you're trying to use.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List