标准C中strtok函数分割字符串
标准C中可以用strtok函数来分割字符串,strtok函数的使用与其他大部分函数的使用方法不同。函数为:char *strtok(char *strings,const char *tokseps);其中strings为要分割的字符串,tokseps是用来分割的字符。用以下的例子进行分析:第6行声明字符串为字符型数组,但当声明为指针型(char *strings = "hello,world!
welcome to the earth")时,编译能够通过...