null consturctor A(): (0x0) Indeces: (0,0) (0,0) #ref: 1 sa:0 (int, int) constructor C(M,N): (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 C = 0.0 C: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X(const &X) constructor D(C) :(10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 (double *, int , int) constructor F(v,10,10): (10x10) Indeces: (0,9) (0,9) #ref: 2 sa:0 X(const &X) constructor with submatrices E(C): (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 test operator(int, int) Initalize C(i,j) = i + j/100.0 C: (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 1 2 2.01 3 3.01 3.02 4 4.01 4.02 4.03 5 5.01 5.02 5.03 5.04 6 6.01 6.02 6.03 6.04 6.05 7 7.01 7.02 7.03 7.04 7.05 7.06 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 test operator(int, int) assignment C(2,3) = 9.0 1 2 2.01 3 3.01 3.02 4 4.01 4.02 4.03 5 5.01 5.02 5.03 5.04 6 6.01 6.02 6.03 6.04 6.05 7 7.01 7.02 7.03 7.04 7.05 7.06 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 test debug and copy(): ob: (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 *this: (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 D.copy(C): (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 D: 1 2 2.01 3 3.01 3.02 4 4.01 4.02 4.03 5 5.01 5.02 5.03 5.04 6 6.01 6.02 6.03 6.04 6.05 7 7.01 7.02 7.03 7.04 7.05 7.06 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 C: 1 2 2.01 3 3.01 3.02 4 4.01 4.02 4.03 5 5.01 5.02 5.03 5.04 6 6.01 6.02 6.03 6.04 6.05 7 7.01 7.02 7.03 7.04 7.05 7.06 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 operator=(double) E = 5.55 : (10x10) Indeces: (0,9) (0,9) #ref: 1 sa:0 D.ref(C): (10x10) Indeces: (0,9) (0,9) #ref: 2 sa:0 1 2 2.01 3 3.01 3.02 4 4.01 4.02 4.03 5 5.01 5.02 5.03 5.04 6 6.01 6.02 6.03 6.04 6.05 7 7.01 7.02 7.03 7.04 7.05 7.06 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 test automatic destructuion of temporaries: B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 B.ref(C)): (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0 test C.ref(C) case works correctly. C.ref(C) (10x10) Indeces: (0,9) (0,9) #ref: 3 sa:0