fork(2) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class Matrix2x2
  6. {
  7. public:
  8. Matrix2x2() : n({{3,1},{4,7}}) {}
  9. void setVal(int row, int col, double newVal);
  10. double n[2][2];
  11. };
  12.  
  13. int main() {
  14. Matrix2x2 m;
  15. cout << m.n[0][0] << endl;
  16. cout << m.n[0][1] << endl;
  17. cout << m.n[1][0] << endl;
  18. cout << m.n[1][1] << endl;
  19. return 0;
  20. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
3
1
4
7