User forums > Help

"dynamic" array in c

(1/1)

forestest:
Hi there,
I'm using C::B for developing C-Progs with the gcc-Compiler,
Why does the gcc-Compiler allow (no error) the declaration of the following "dynamic" Array:
--
void plateau(int *messDaten, int datenAnzahl){
    int zwischenWert[datenAnzahl];//not allowed in C !?! malloc or similar memory-allocation required ... ?!?
    //...
--
Other Compilers would show up an error like "Constant Expression/Term expected" - so would I have ...
Thx for your comments

MortenMacFly:
Ask in a compiler forum, not in a forum related to an IDE. To avoid confusion, next time read the forum rules before posting. Thank you.

Navigation

[0] Message Index

Go to full version