Have made a function to trap any errors when entering a number into my program from the keyboard. Doesnt allow any keys apart from 1 to 0 and also ESC, Backspace and Enter.
returns a non-zero if the user presses escape to cancel input, also takes in a length to restrict length of number. but i cant get sscanf() to output a LONG integer, it just put on a normal integer, so if i enter a number greater than 36k or whatever it just goes mental!
try it out and see, i called it with a length of 10.
int iinteger(long int *number,int length)
long int inc,ret,x,y,x1,y1;
if(inc=48 && input<=57)
wondering if anyone can see the problem i have, i cant as of yet solve the problem. i want to be able to enter a LARGE number and it be converted into a long int before it is passed out (by reference)