extern on array

hello,

I hope someone can explain to me why, when declaring global arrays, you cannot define the first dimension of the array in the header file. For example I have...

defs.c

int intarray[2];
int 2intarray[2][2];

and then

defs.h

extern int intarray[];
extern int intarray[][2];

As you notice, the first dimension in the defs.h file cannot be specified, but then the higher dimensions can. Why is this?

I am guessing this has to do with memory allocation
Topic archived. No new replies allowed.