lijiang 于 2011-05-17 19:17:15发表:
[i=s] 本帖最后由 lijiang 于 2011-5-17 20:27 编辑 [/i]main() {char str[9]="12:1:12"; char *p; p=strtok(str,":"); while(p) { printf("%s\n",str); p=strtok(NULL,":"); } }
lijiang 于 2011-05-17 19:17:15发表:
[i=s] 本帖最后由 lijiang 于 2011-5-17 20:27 编辑 [/i]
main()
{char str[9]="12:1:12";
char *p;
p=strtok(str,":");
while(p)
{
printf("%s\n",str);
p=strtok(NULL,":");
}
}