Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. struct Foo
  2. {
  3. int A;
  4. int B;
  5. int C;
  6. };
  7.  
  8. Foo foos[] = {
  9. {0,1,2},
  10. {3,4,5},
  11. // ...
  12. };
  13.  
  14. struct Foo
  15. {
  16. Foo(int a, int b, int c) : A(a), B(b), C(c) {}
  17. int A;
  18. int B;
  19. int C;
  20. };
  21.  
  22. const std::size_t FooSize = ...;
  23. Foo foos = new Foo[FooSize]();
  24. foos[0] = Foo(1,2,3);
  25. foos[1] = Foo(3,4,5);
  26. // etc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement