Here is my code:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define DIMENSION 3
#define SIGN(i, j) pow(-1, i+j)
double det(double entries)
{
int dim = DIMENSION;
int k, l, m;
double submatrix[dim-1][dim-1];
double det;
det = 1;
if(dim == 2)
{
det = ( (entries[0][0]) * (entries[1][1]) ) - ( (entries[0][1]) * (entries[1][0]) );
return det;
What I don't understand, is that I keep getting the error message "subscripted value is neither array nor pointer" for the line:
Code:
det = ( (entries[0][0]) * (entries[1][1]) ) - ( (entries[0][1]) * (entries[1][0]) );
Can someone explain what I've done wrong? What is the 'subscripted value'