double det(double matrix[][], int bound) { double ans = 0; if(bound == 2) { return matrix[1][1] * matrix[2][2] - matrix[1][2] * matrix[2][1]; } double mminor[bound][bound]; int k = 0; for(int i = 1; i < bound + 1; i++){ for(int j = 0; j < bound; j++, k++){ if(j!=i) mminor[i][k] = matrix[i][j]; } ans += (-1 ^ (i+1)) * matrix[1][i] * det(mminor, bound - 1); } return ans; }

When I compile, I get this error message:

Quote

C:\Users\Andrew\Documents\MATH365\hw3.cpp|32|error: cannot convert `double (*)[((unsigned int)((int)bound))]' to `double (*)[8]' for argument `1' to `double det(double (*)[8], int)'|

So, is there any (easy) way I can remedy this problem? Preferably without having to go back and rewrite my whole program using a Matrix class?

edit:

I should mention that I know all matrices will be 8x8.

This post has been edited by **akwarthan**: 13 September 2010 - 11:18 PM