Ramisa Fariha, is this Q10.7 from your book?
"10.7 Implement a Matrix class for 2-by-2 matrices"
A 2x2 matrix is a 2D array. You are not creating the array. You appear to be using 4 individual variables instead.
Edit: I've just noticed that the solution in the book uses this technique.
@Carrie I tried it at first in the print() but since it belongs to the type matrix it can't be done by using cout...and that's what I want to know like how to print an output value which is of class type
you see it's not double inverse() or int type ..it is Matrix inverse and the temp is also written as Matrix temp..now How can I cout temp?