i'm trying to parse a string of digits that can be 1 to 3 chars long, but how to do this is eluding me.
would an isDigit method work? like this:
if(isdigit(vararray[v])){
if(isdigit(vararray[v+1]) || vararray[v+1]==NULL){
if(isdigit(vararray[v+2]) || vararray[v+2]==NULL){
if(isdigit(vararray[v+3]) || vararray[v+3]==NULL){
return;
}
return;
}
return;
}
return;
}
but i get the warning: comparison between pointer and integer.
am i close to a solution for this problem?