C语言问题从文件中读取字符串

2024-11-25 20:53:37
推荐回答(1个)
回答1:

str = strtok("hehe##234##ssd##56","##");
//str = "hehe" 指针里的字符串
str = strtok(NULL,"##");
//str = "234"
str = strtok(NULL,"##");
//str = "ssd"
str = strtok(NULL,"##");
//str = "56"