This is the variable length array VLA in the C language C99 standard, which is not supported by the C++ standard. The gcc compiler supports variable-length arrays, but the vc compiler does not. Search for variable length arrays. There will be a lot of information on this (in Chinese and English). Stroustrup, the father of C++, talked about variable-length arrays on his website. There is a short paragraph. If you are interested, you can check it out http://www.stroustrup.com/bs_...
This is the variable length array VLA in the C language C99 standard, which is not supported by the C++ standard. The gcc compiler supports variable-length arrays, but the vc compiler does not. Search for variable length arrays. There will be a lot of information on this (in Chinese and English). Stroustrup, the father of C++, talked about variable-length arrays on his website. There is a short paragraph. If you are interested, you can check it out http://www.stroustrup.com/bs_...
C++ does not support variable length arrays, C supports it