Can't call function in c -
i trying call function in following way: before int main:
int matrixcheck(int matrix[][len] , int j , int i);
call in main:
flag = matrixcheck(matrix[][len] , int j , int i);
the function itself:
int matrixcheck(int array[][len] , int j , int i)
and receiving following error error: syntax error before ']' token
(the call in main)
there no error before call because has following code before it.
int matrix[][len] = {{16,2,3,13},{5,11,10,8},{9,7,6,12},{4,14,15,1}}; int = 0, j = 0; int flag = 0;
anyone has idea why happens?
the compiler says there syntax error because there syntax error.
the first argument calling matrixcheck
should matrix
no []
, other junks.
junk int
before second , third arguments should removed.
Comments
Post a Comment