#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;
}