I have following code snap written in VC++ 6.0
if ( sscanf( p,"%02x",&ID ) != 1 )
{
printf("ID = %d\n",ID);
return Error;
}
If p = “tt” or “TZ” or “Za” or “R5” it returns error but “4T” or “7G” does not.
What change do I need to make to return error even for “4T” and “7G”?
That is, I want to return error if any of the character is non-numeric.