Skip to content

Instantly share code, notes, and snippets.

@steveobbayi
Created March 31, 2016 17:27
Show Gist options
  • Save steveobbayi/b09c5e6ba7c67d2c888961f999cdb12b to your computer and use it in GitHub Desktop.
Save steveobbayi/b09c5e6ba7c67d2c888961f999cdb12b to your computer and use it in GitHub Desktop.
vector<int> v = {1,2,3,4};
reverse_iterator<vector<int>::iterator> ri;
for(ri = v.rbegin(); ri != v.rend(); ri++)
cout << *ri<< endl;
// The above prints out 4,3,2,1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment