I don't think strtok is necessary. You can read the data straight from the file with fscanf using the %s format since it skips spaces automatically. Something like:
char token[100];
//...
Type: Posts; User: oogabooga
I don't think strtok is necessary. You can read the data straight from the file with fscanf using the %s format since it skips spaces automatically. Something like:
char token[100];
//...
You could read it "word by word" (whether that word is something like "split" or something like "8") using scanf with the %s format and then test the first character to see if it's between '0' and...