📅  最后修改于: 2022-03-11 14:44:49.195000             🧑  作者: Mango
#include
#include
std::string input = "abc,def,ghi";
std::istringstream ss(input);
std::string token;
while(std::getline(ss, token, ',')) {
std::cout << token << '\n';
}