Is this correct ? This is compiled with g++ (3.4) sucessfully.
int main() { int x = 12; char pz[x]; }
Technically, this isn't part of C++. You can do variable length arrays in C99 (ISO/IEC 9899:1999) but they are not part of C++. As you've discovered, they are supported as an extension by some compilers.