Getting this error don't understand really what i need to do to trouble shoot...
hw.c: In function ‘PrintMatrix’:
hw.c:14: error: subscripted value is neither array nor pointer
hw.c: In function ‘main’:
hw.c:27: warning: passing argument 1 of ‘PrintMatrix’ makes integer from pointer without a cast
#include <stdio.h>
#include <pthread.h>
int size=0;
void PrintMatrix(int matrix){
int i, j;
// print A
for(i = 0; i < size; i++)
{
for(j = 0; j < size; j++)
{
printf("%d ", matrix[i][j]);
}
printf("\n");
}
printf("\n\n");
}
main(int argc, char* argv[])
{
size = atoi(argv[1]);
int matrixA[size][size];
int matrixB[size][size];
int matrixC[size][size];
PrintMatrix(matrixA);
return 0;
}
Any help will be appreciated....