如何合并分割了的字符串
程序代码:#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char s[100]={0};
strcpy(s,"sfrg-egt-4 -rg5y6r-5y");
const char *ds;
ds=strtok(s,"-");
int i =0;
while(ds)
{
printf("%s\n",ds);
ds=strtok(NULL,"-");
i++;
}
return 0;
}
[local]1[/local]




