(Question updated after first comment)
int max_size = 20;
int h[max_size];
Debugging gives a value of [-1] for h when using max_size to initialize;
If instead I initialize using an integer. So the code is:int h[20]
, it works fine.
This was with GCC 4.2 on Mac OS X 10.6.