#include <stdio.h>
#include <string.h>
int main(){
char name[] = "eseumdesconhecidolheoferecerflores.issoeimpulse.cities";
char *str;
printf("%s\n", name)
str = strtok(name, ".cities");
printf("%s\n", str);
return 0;
}
这是输出:
eseumdesconhecidolheoferecerflores.issoeimpulse.cities
umd
我完全不知道发生了什么。我想要的是strtok的输出是指向"eseumdesconhecidolheoferecerflores.issoeimpulse"
答案 0 :(得分:4)