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 21:05

AMATEUR TIP:
seriously your problem is too simple to give you help on. there are people who debug with cout statements only. if you are to lazy to swap out variables in a cout statement to fine where the problem is then you are missing the whole point of programming

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