fork download
  1. #include <iostream>
  2.  
  3. struct s { int mat[2][2]; };
  4.  
  5. int main()
  6. {
  7. s obj { { {1,1}, {1,1} } };
  8. obj = s { { {2,2}, {2,2} } };
  9.  
  10. std::cout << obj.mat[1][1] << "\n";
  11. }
Success #stdin #stdout 0s 3344KB
stdin
Standard input is empty
stdout
2