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 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 2.03 2.04 2.05 2.06 2.07 2.08 2.09 3.04 3.05 3.06 3.07 3.08 3.09 4.05 4.06 4.07 4.08 4.09 5.06 5.07 5.08 5.09 6.07 6.08 6.09 7.08 7.09 8.09 test operator(int, int) assignment C(2,3) = 9.0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 9 2.04 2.05 2.06 2.07 2.08 2.09 3.04 3.05 3.06 3.07 3.08 3.09 4.05 4.06 4.07 4.08 4.09 5.06 5.07 5.08 5.09 6.07 6.08 6.09 7.08 7.09 8.09 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: 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 9 2.04 2.05 2.06 2.07 2.08 2.09 3.04 3.05 3.06 3.07 3.08 3.09 4.05 4.06 4.07 4.08 4.09 5.06 5.07 5.08 5.09 6.07 6.08 6.09 7.08 7.09 8.09 C: 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 9 2.04 2.05 2.06 2.07 2.08 2.09 3.04 3.05 3.06 3.07 3.08 3.09 4.05 4.06 4.07 4.08 4.09 5.06 5.07 5.08 5.09 6.07 6.08 6.09 7.08 7.09 8.09 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 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 9 2.04 2.05 2.06 2.07 2.08 2.09 3.04 3.05 3.06 3.07 3.08 3.09 4.05 4.06 4.07 4.08 4.09 5.06 5.07 5.08 5.09 6.07 6.08 6.09 7.08 7.09 8.09 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