我想分配一个矩阵.
这是唯一的选择:
int** mat = (int**)malloc(rows * sizeof(int*)) for (int index=0;index<row;++index) { mat[index] = (int*)malloc(col * sizeof(int)); }
c malloc pointers matrix
c ×1
malloc ×1
matrix ×1
pointers ×1