I have a string and I'd like to check whether a character at a certain position is a digit or a letter.
I would do it like this:
char *mynumber - comes from function parameter
int a = atoi(mynumber[0]);
int b = atoi(mynumber[1]);
int c = atoi(mynumber[2]);
if (isdigit(mynumber[0]) && (b - a = 1) ...)
But it keeps telling me "passing arg 1 of `atoi' makes pointer from integer without a cast", so I guess it doesn't like mynumber[i] which a thought would work for returning a character from a string.
Any suggestions ?
Best wishes, D5