Keep getting the wrong answer for matrix determinant

I have been writing a matrix class that calculates the determinant of any n x m input matrix using 1D dynamic array (single pointer), however I am getting incorrect outputs and I can not seem to see my problem, here is my code, the "da_minorM" calculates the minor matrices, the "index" member function returns the locations of any 2D matrix converting them into locations in 1D matrix. I have also overloaded "()", "[]" and "=" operators. here is my code:
(apologise it is quite long)

Found my problem, misplaced two variables.
Last edited on
Topic archived. No new replies allowed.