Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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);
- }
- }
Add Comment
Please, Sign In to add comment