1std::string s = "What is the right way to split a string into a vector of strings";
2std::stringstream ss(s);
3std::istream_iterator<std::string> begin(ss);
4std::istream_iterator<std::string> end;
5std::vector<std::string> vstrings(begin, end);
6std::copy(vstrings.begin(), vstrings.end(), std::ostream_iterator<std::string>(std::cout, "\n"));