When the user enters a number less then 1, and higher then 1000, as well as some sort of validation which makes sure a number is entered instead of a letter or symbol. I tried cin.fail() but I couldn't get it quite to work.

I'll download the boost repositry tomorrow and see how yours works out.
–
John BrownJan 5 '13 at 0:23

With boost it is safe to detect an error on conversion (catching boost::bad_casting exception), but you can try the function from the standard for conversion between c-string and integer called std::atoi (en.cppreference.com/w/cpp/string/byte/atoi)
–
coelhudoJan 5 '13 at 12:03

-First read in a string and try Typecasting it and handle the errors with try-catch.
-Then use conditions to make sure the input is in range.
-If the input isn't valid, you can write an error message to display.

It's usually not a good idea to use try-catch to control the flow of a program. try-catch is for exception handling. Exception handling is pretty slow. It's not wrong to use exceptions, but check for errors manually first. Don't throw unneccessary exceptions.
–
SkalliJan 7 '13 at 12:48