Skip to content

Instantly share code, notes, and snippets.

@hadronized
Created June 11, 2011 22:29
Show Gist options
  • Save hadronized/1021039 to your computer and use it in GitHub Desktop.
Save hadronized/1021039 to your computer and use it in GitHub Desktop.
increment
#include <algorithm>
#include <iostream> // std::cout / std::endl;
using namespace std;
int main() {
int const values[] = {1, 2, 3, 4, 5};
std::for_each(values, values+5, [](int v) {
cout << v << endl;
});
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment