I am trying to declare a global array of structures, I have tried placing it in my main, and tried placing it in my header, but it never seems to work regardless of where I define it. Currently, I have it defined in my header:
In a .c file I then try to access .x:Code:struct boardstate{int x;}; typedef struct boardstate state[1000];
This gives me an "parse error before '[' token" error. I've also tried defining the structure in my main, and then listing extern struct boardstate state[1000]; in my header, but that doesn't work either.Code:state[0].x=0;