Created
January 17, 2019 00:11
-
-
Save croepha/7482267e0ed69c213b4c99b87746d7d3 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 <stdio.h> | |
#include <vector> | |
struct Thing { | |
int v1; | |
int v2; | |
}; | |
int main () { | |
std::vector<Thing> things; | |
for(int i =0; i<5;i++) { | |
things.push_back(Thing{(i+1)*111,(i+1)*11111}); | |
} | |
for(auto&thing:things) { | |
printf("thing: %d, %d\n", thing.v1, thing.v2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment