Skip to content

Instantly share code, notes, and snippets.

@cblp
Last active March 4, 2018 09:27
Show Gist options
  • Save cblp/2c406987dea29cf7c8c82629f7d8c6e3 to your computer and use it in GitHub Desktop.
Save cblp/2c406987dea29cf7c8c82629f7d8c6e3 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
#include <boost/range/algorithm_ext.hpp>
#include <boost/range/istream_range.hpp>
using namespace boost;
int main() {
string line;
getline(cin, line);
vector<int> ints;
stringstream lineS(line);
push_back(ints, istream_range<int>(lineS));
for (auto i : ints)
cout << i << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment