📜  malloc 连续二维数组 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:40.140000             🧑  作者: Mango

代码示例1
int **A = malloc(ROWS * sizeof(int*));
A[0] = malloc(ROWS * COLS * sizeof(int));
for(int i = 1; i < ROWS; i++) 
   A[i] = A[i-1] + COLS;
// use A[i][j]