I have created a class of 3*3 matrix. In which i have defined an operator for matrix multiplication.

the code goes like this:

Code:matrix operator * (matrix m) { matrix x; for (int i=0; i<3; i++) for (int j=0; j<3; j++) x.array[i][j]=array[1][j] * m.array[i][1]; x.array[i][j]=array[2][j] * m.array[i][2]; x.array[i][j]=array[3][j] * m.array[i][3]; return x; }

can anybuddy help me this code is wrong