Skip to content

Instantly share code, notes, and snippets.

@procrastonos
Created January 23, 2014 10:04
Show Gist options
  • Select an option

  • Save procrastonos/8575999 to your computer and use it in GitHub Desktop.

Select an option

Save procrastonos/8575999 to your computer and use it in GitHub Desktop.
Tokenize a string with STL functions and save tokens to a vector.
string line = "Some text";
istringstream iss(line);
vector<string> tokens{istream_iterator<string>{iss}, istream_iterator<string>{}};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment