博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年8月12日

摘要: strtok 函数原型char *strtok(char *_str, const char *_delim); 函数功能是用分隔符集分割一个字符串,并且得到每一个子串 char *s="how to use it";char *d=" ";char *p;p=strtok(s,d);while(p){ printf("%s\n",s); p=strtok(NULL,d);}程序输出howtous... 阅读全文

posted @ 2011-08-12 11:40 yuanzfy 阅读(474) 评论(0) 推荐(0)