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

Simple C++ error checking question

Name: Anonymous 2007-04-30 12:51 ID:xTzKP01J

I bet the answer to this is simple and I'm simply too stupid to figure it out.

I have a program that is asking for a number in the range of 1-8. I do not want to allow the user to enter strings. What is a short and clean way to only allow ints to be entered?

Name: Anonymous 2007-04-30 13:25 ID:VqPPBGqi

if(number == int) then continue;
else ERROR, REPEAT;

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