Skip to content

Instantly share code, notes, and snippets.

@mochow13
Last active September 12, 2018 07:50
Show Gist options
  • Save mochow13/3a497f9710e0d7e7291c5e079dad3206 to your computer and use it in GitHub Desktop.
Save mochow13/3a497f9710e0d7e7291c5e079dad3206 to your computer and use it in GitHub Desktop.
std::vector<int> collection={2,4,4,1,1,3,9};
// notice that we pass x as reference!
std::for_each(begin(collection),end(collection),[](int &x) {
x=x*26;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment