atoi or what?
Posted on 1998-08-06
Ok, the problem that Im having is that Iam simplly trying to add a failsafe into my code which is already written!
The code accepts an integer input but what if the user presses a character key (accidently of course). I have tried using 'int = atoi(char)' which works great but if I do press a character key then a zero is placed in the input! Does anybody have a suggestion that might resolve this problem?
Thanks for any help,