fork download
  1. #include <array>
  2.  
  3. struct S
  4. {
  5. std::array<int, 5> b = {1, 2, 3, 4, 5};
  6. };
  7.  
  8. int main() {
  9. // your code goes here
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:5:42: error: array must be initialized with a brace-enclosed initializer
     std::array<int, 5> b = {1, 2, 3, 4, 5};
                                          ^
prog.cpp:5:42: error: too many initializers for ‘std::array<int, 5u>’
stdout
Standard output is empty