C++中動態分配二維數組

一直對二維數組 動態分配問題比較模糊,今天來終結一下。 我們一般使用二維數組可以直接定義如下: [cpp] view plain copy #include<iostream>   using namespace std;      int main()   {       int array[5][5];   }   但是有時候我們不知道數組的維數,C++不允許直接用變量作爲維數,所以就要用到動
相關文章
相關標籤/搜索