| tdk93 (2) | |
|
I'm using the following statements to initialise array int d; cin >> d; int array[d]; and these are working properly! isn't this incorrect? shouldn't the array be initialized dynamically using new | |
|
|
|
| Catfish3 (279) | |
|
Just in case that link dies someday... @ tdk93: this is a feature of C99 (the C language standard of 1999), which works in some C++ compilers, but C++ doesn't officially support it. The feature is called VLA: variable-length arrays, because the array length is a variable and not a constant. | |
|
Last edited on
|
|