Created
May 17, 2016 07:01
-
-
Save bstrie/68d57c89bb6b1f735c14bd15168f6495 to your computer and use it in GitHub Desktop.
This file contains 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 <iostream> | |
#include <vector> | |
int main() { | |
std::vector<int> v { 2, 3, 4 }; | |
for(auto i: v) { | |
if (i % 2 == 0) { | |
v.push_back(i * -1); | |
} | |
} | |
for (auto i: v) { | |
std::cout << i; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment