fork(3) download
  1. #include <iostream>
  2.  
  3. struct A
  4. {
  5. int i;
  6. A(int j) : i{j} {};
  7. A() = default;
  8. };
  9.  
  10. int main() {
  11. A a[3] = { A(1) };
  12. std::cout << a[1].i << ' ' << a[2].i << '\n';
  13. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
0 0