Y
yogi_bear_79
char *year = strtok_s(NULL, "\0", &nextToken);
c = atoi(year+2);
The above code c = atoi(year+2); was suggested to me to help turn the
Char* into an int and only keep the last two characters. Now I need to
do the same thing but only keep the first two. I'd like a reference
on the +2 part, as this is the part I didn't know about. Since I
assume the code to display the first two digits would be similar I
would like a reference on what was done here. Thanks
c = atoi(year+2);
The above code c = atoi(year+2); was suggested to me to help turn the
Char* into an int and only keep the last two characters. Now I need to
do the same thing but only keep the first two. I'd like a reference
on the +2 part, as this is the part I didn't know about. Since I
assume the code to display the first two digits would be similar I
would like a reference on what was done here. Thanks