討論串[問題] 如何動態的宣告一個2維矩陣
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓4(4推 0噓 8→)留言12則,0人參與, 最新作者CS1DADA (CS1DADA)時間12年前 (2011/12/19 17:22), 編輯資訊
1
0
0
內容預覽:
問題(Question):. 我有一個矩陣要宣告成全域變數. 但是這個矩陣要讀檔後才能知道他的大小. 請問要怎宣告?. eg:. #include<stdio.h>. int row,column;. int graphic[row][column];. main(){. .. .. .. }.

推噓0(0推 0噓 3→)留言3則,0人參與, 最新作者pnpncat (meow)時間12年前 (2011/12/20 15:23), 編輯資訊
0
0
2
內容預覽:
template <typename T>. T **alloc_2D_array(int width, int height). {. T **arr = (T **)calloc(height, sizeof(T *));. if (arr == NULL). exit(1);. arr[0]
(還有566個字)
首頁
上一頁
1
下一頁
尾頁