#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 101
int main(){
char string[MAX];
printf("plz enter a string:\n");
gets(string);
size_t counter=0;
char *tokenPtr;
tokenPtr=strtok(string," ");//use "" instead of ''
while(tokenPtr!=NULL){
tokenPtr=strtok(NULL," ");//i dont understand here
counter++;
}
printf("total words is %d",counter);
}//strtok will change our original string
这里第二次初始化strtok的时候为什么要用strtok(NULL," ")呢