When declaring an array, the length must be a constant known at compile time. What you are using here is a language extension for C compilers that allows a "variable-length" array to be defined statically. The downside is that your solution will be non-portable and non-standard as not all compilers support this extension. See http://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html for example.
jonsca
Quantitative Phrenologist
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581