Guest User

Untitled

a guest
Jan 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <vector>
  3.  
  4. struct Thing {
  5. int v1;
  6. int v2;
  7. };
  8.  
  9. int main () {
  10.  
  11. std::vector<Thing> things;
  12.  
  13. for(int i =0; i<5;i++) {
  14. things.push_back(Thing{(i+1)*111,(i+1)*11111});
  15. }
  16.  
  17.  
  18. for(auto&thing:things) {
  19. printf("thing: %d, %d\n", thing.v1, thing.v2);
  20. }
  21.  
  22.  
  23. }
Add Comment
Please, Sign In to add comment