#include <iostream>
#include <sstream>
#include <string>
int main(int argc, char *argv[])
{
std::string parseMe = "This is a test, string";
std::stringstream parser(parseMe);
std::string token;
while (std::getline(parser, token, ' '))
{
std::cout << token << "\n";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KCmludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pCnsKICAgIHN0ZDo6c3RyaW5nIHBhcnNlTWUgPSAiVGhpcyBpcyAgICAgYSB0ZXN0LCBzdHJpbmciOwogICAgc3RkOjpzdHJpbmdzdHJlYW0gcGFyc2VyKHBhcnNlTWUpOwogICAgc3RkOjpzdHJpbmcgdG9rZW47CgogICAgd2hpbGUgKHN0ZDo6Z2V0bGluZShwYXJzZXIsIHRva2VuLCAnICcpKQogICAgewogICAgICAgIHN0ZDo6Y291dCA8PCB0b2tlbiA8PCAiXG4iOwogICAgfQogICAgCiAgICByZXR1cm4gMDsKfQ==