There is such code:
#include int main() { int size; std::cin >> size; size = size + 1; int tab3[size]; tab3[0] = 5; std
It is a C99 feature, not a part of C++. They are commonly refered to as VLAs(Variable Length Arrays.
If you run g++ with -pedantic it will be rejected.
g++
-pedantic
See GCC docs for more info.
See also: VLAs are evil.