I'm trying to parse a char string into an INT.
If I had...
unsigned char color[] = "255"
And wanted to parse this into an INT. How would I go about doing this?
I tried...
unsigned char *split;
split = strtok(color," ,.-");
while(split != NULL)
{
split = strok(NULL, " ,.-);
}
This just gives me the value 255 for split now.
I feel like I need something like...
int y = split - '0'; //but this makes an INT pointer without a cast