I have a struct named Game with an array of levels, defined like this:
typedef struct
{
Level levels[x];
} Game;
When I compile the code, if x is 1, 2 or 3, the program runs normally. If it's any other value (4, for instance), I get a segmentation fault. I'm not accessing the array anywhere. Main is something like this at the moment (commented everything except the initialization):
int main (...)
{
Game g;
return 0;
}
Any clue of what this might be?
Thanks in advance.