Re: Beginner C++ question
Translate the string to the equivalent number. Using atoi is probably the easiest way.
Re: Beginner C++ question
use something like
Code:
(0 < 1) && (1 < 5);
good with if statement.
Re: Beginner C++ question
Since it's a single digit, you could just read in a char and compare it to '1' and '5' (the ASCII characters, not the numbers). However, to protect against multiple characters being entered, you might want to read an entire string and then just compare the first character.