Strange thing with static Array!

me22 me22.ca@gmail.com
Sat Feb 28 17:06:00 GMT 2009


On Sat, Feb 28, 2009 at 04:47, gfx art <xgrafix@gmail.com> wrote:
>
> as I knew and learned that we can't compile a dynamic size with a
> static array at compile time
>
> but my code below can be compiled and I can change the size every time
> I run the code
>
> also it is working at run time!!
>

GCC allows the Variable Length Arrays feature from C99 in C++ as an extension.

Consider compiling with -ansi -pedantic

~ Scott



More information about the Gcc-help mailing list