Created
August 11, 2018 15:24
-
-
Save gchavez2/642fc656a19d06775d074a9782afa605 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <iostream> | |
using namespace std; | |
// Requires C++11 compiler | |
int main(int argc, char const *argv[]) | |
{ | |
vector<int> vec{5,7,2,32,9,45}; | |
for_each(vec.begin(), vec.end(), | |
[](int &v) { | |
cout << v++ << " "; | |
}); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment