經安全檢測,此網站為安全網站,請放心前往原始網址!

How do I declare a 2d array in C++ using new? - Stack Overflow

In C++11 it is possible: auto array = new double[M][N]; This way, the memory is not initialized. To initialize it do this instead: auto array = new double[M][N](); Sample program (compile with "g++ -std=c++11"): #include #include #include

stackoverflow.com

網址安全性掃描由 google 提供