This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange thing with static Array!


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]