标签:tor net main top 读取 取数据 rto clu file
参考:http://blog.csdn.net/js_xj/article/details/5863734
#include <stdio.h> #include <string.h> int main() { char buf[]="Golden Global View"; char* token = strtok(buf, " "); while(token != NULL) { printf("%s\n", token); token = strtok(NULL, " "); } return 0; }
写成这样就报错了
int read(){ FILE* fp; fp = fopen("C:\\Users\\Administrator\\Desktop\\tiaoshi\\example.txt","r"); char* token = strtok(fp," ");//mistake while(token!=NULL){ printf("%s",token); token = strtok(NULL,","); } return 0; }
标签:tor net main top 读取 取数据 rto clu file
原文地址:http://www.cnblogs.com/kprac/p/7777588.html