fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. struct {
  6. int a, b;
  7. } foo[] = {
  8. { 10, 20 },
  9. { 11, 22 },
  10. { 12, 21 }
  11. };
  12.  
  13. std::cout << foo[1].a << " " << foo[2].b << std::endl;
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 2680KB
stdin
Standard input is empty
stdout
11 21