It's because when C/C++ attempts to read a number and gets a non-number, the input functions stop reading at that point.
The offending character stays in the buffer.
Next read the character is...
Type: Posts; User: WaltP
It's because when C/C++ attempts to read a number and gets a non-number, the input functions stop reading at that point.
The offending character stays in the buffer.
Next read the character is...
He didn't?
Yes he did. I just expanded on how...
As laserlight suggested, use a string to input the values. They won't goof up if you enter the wrong thing.
Then you have to check each character in the string to make sure it's a valid number....