Possible Duplicate:
In C++ books, array bound must be constant expression, but why the following code works?
I do this within main():
int i = 2; //not constant expression
int foo[i]; //no error?
This doesn't give me an error as it should according to my book. Why?
(i'm on clang 3.1)