#include <cstring>
#include <iostream>
int main()
{
char input[100] = "A bird came down the walk";
char *token = std::strtok(input, " ");
while (token != NULL) {
std::cout << token << '\n';
token = std::strtok(NULL, " ");
}
}
字符串分割
最新推荐文章于 2024-07-25 18:17:30 发布