How can I use strtok_r instead of strtok to do this?
char *pchE = strtok(NULL, " ");
Now I'm trying to use strtok_r
properly... But sometimes I get problems with the strtol
.
I have a thread that I execute 10 times (at the same time).
char *savedEndd1;
char *nomeClass = strtok_r(lineClasses, " ", &savedEndd1);
char *readLessonS = strtok_r (NULL, " ", &savedEndd1);
char *readNTurma = strtok_r(NULL, " ", &savedEndd1);
if (readNTurma==NULL)
printf("CLASS STRTOL begin %s %s\n",nomeClass, readLessonS );
int numberNTurma = strtol(readNTurma, NULL, 10);
And I'm catching that readNTurma == NULL
several times... Why is that? Cant understand why it comes NULL
?