read two values

so you mean something like

No. The code I posted collects the data in the array called inData. That array is what strtok() parses. Did you look at the strtok() documentation? If you had, you would see that it returns a pointer to a token. It is that pointer that gets passed to atoi().