C++11 dynamically allocated variable length multidimensional array
问题 I've been trying to create a variable length multidimensional array. As I understand, you can't create variable length arrays on the stack, but you can create 1D variable length arrays in C++ using dynamic allocation. Correct me if this is a compiler extension, but it seems to work fine on clang and gcc with --pedantic set. int size = 10; int *ary = new int[size](); I tried to extend the concept to multidimensional arrays. Here are my results. The problem with possiblity 1 and 2 is that they