Syntax when calling an array as the variable in a new block of code? [C] -



Syntax when calling an array as the variable in a new block of code? [C] -

i'm still pretty new coding i'm having problem syntax in situation. how supposed format this? whenever seek build program, says there error:

error: expected primary-expression before ']' token assign_q(chess[][]);

there's no need me set code here, here's little snippet:

#define n 8 int chess[n][n] = {2}, l, m; void assign_q(int chess[n][n]); int main() { int i, j; assign_q(chess[][]);

in c, if want pass array, have not have utilize []-operator. []-operator access array-elements.

in illustration chess of type int [][], there no need de-reference it.

however, may not have pass array @ all. if declare array @ global scope have done it, can access straight anywhere within same compilation unit or 1 using extern.

c arrays

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -