This a a C99 feature called VLA which some compilers also allow in C++. It’s allocation on stack, just as it would be with int a[10]
.
More Related Contents:
- positioning pie slice problems
- If statement – C++
- why my code is giving undeclared variable error?
- Read whole ASCII file into C++ std::string [duplicate]
- Legality of COW std::string implementation in C++11
- How should I write ISO C++ Standard conformant custom new and delete operators?
- Windows threading: _beginthread vs _beginthreadex vs CreateThread C++
- How to solve the 32-byte-alignment issue for AVX load/store operations?
- What’s the best way to iterate over two or more containers simultaneously
- Using local classes with STL algorithms
- sizeof a union in C/C++
- Where should I prefer pass-by-reference or pass-by-value?
- How to use base class’s constructors and assignment operator in C++?
- Convert float to string with precision & number of decimal digits specified?
- Initialisation and assignment
- convert vector into char** C++
- Can lambda functions be templated?
- C++ – passing references to std::shared_ptr or boost::shared_ptr
- Acquire/release semantics with non-temporal stores on x64
- typedef changes meaning
- Disambiguate overloaded member function pointer being passed as template parameter
- Is infinite loop still undefined behavior in C++ if it calls shared library?
- How to use lock in OpenMP?
- How does C++ link template instances
- How to create a vector of user defined size but with no predefined values?
- How to tell if a lib was compiled with /mt or /md?
- GCC std::thread not found in namespace std
- c++ global object
- std::getline() reads carriage return \r into the string, how to avoid that?
- using extern template (C++11) to avoid instantiation