Although definitely not as efficient as Prelude's code, I still like my determinant function. It calculates it via expansion by minors/cofactors with recursion.

Code:

Matrix findMinor(Matrix *A, int row, int col)
{
int x;
int y;
int a;
a = A->numR();
int b;
b = A->numC();
Matrix M(a-1,b-1);
for(x=0; x<a; x++)
{
for(y=0; y<b; y++)
{
if(x == (row-1));
if(y == (col-1));
if(x > (row-1) && y > (col-1)) M.Array[x-1][y-1] = A->Array[x][y];
if(x > (row-1)) M.Array[x-1][y] = A->Array[x][y];
if(y > (col-1)) M.Array[x][y-1] = A->Array[x][y];
else M.Array[x][y] = A->Array[x][y];
}
}
return M;
}
float Matrix::Determinant()
{
float det;
Matrix temp;
float temp2;
float multiple;
int y;
det = 0;
if(a==b && b==2)
{
det = (Array[0][0]*Array[1][1])-(Array[0][1]*Array[1][0]);
return det;
}
if(a != b)
{
return 0;
}
else
{
for(y=0; y<b; y++)
{
if(y == b) break;
else
{
multiple = power(-1, y);
temp = findMinor(this,1,y+1);
temp2 = temp.Determinant();
det = (multiple * (Array[0][y] * temp2)) + det;
}
}
return det;
}
}