c++ split string by space into array
include
include
include
include
int main() {
std::string str = "Hello world, this is a sample string";
std::vector
while (ss >> word) { words.push_back(word); }
for (const auto &w : words) { std::cout << w << std::endl; }
return 0; }