fork download
  1. #include <iostream>
  2. #include <array>
  3.  
  4. struct A
  5. {
  6. int foo;
  7. double bar;
  8. };
  9.  
  10. struct Aarray
  11. {
  12. A data[2];
  13. };
  14.  
  15. int main()
  16. {
  17. Aarray a1 =
  18. {
  19. {0, 0.1},
  20. {2, 3.4}
  21. };
  22. }
  23.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:21:3: error: too many initializers for 'Aarray'
stdout
Standard output is empty