I'm trying to pass a multi array (for example 3x3) to be printed in a matrice type form using Objective C. I'm fairly new to the language and am stuck. I can pass a single array, however with multi arrays I get the error Array type has incomplete element type.
void printMat(float value[][], int rows, int col)
{
int j, k;
float printpt;
//Handles coloum printing
for (k=0; k<col; k++)
{
NSLog(@"/n");
//Handles row printing
for (j=0; j<rows; j++)
{
printpt = value[j][k];
NSLog(@"%f ", printpt);
}
}
}
I'm trying to call the function with
printMat(A, n, n)
Where A is the float A[30][30] and n=30. What the best way to achieve this or to pass multi dimensional arrays?