来源:http://www.cnblogs.com/zhangchaoyang/articles/1855744.html
部分摘要:
#include<stdio.h> #include<stdlib.h> #define ROW 5 #define COL 4 main(){ int i; int **arr; arr=(int **)malloc(ROW*sizeof(int*)); for(i=0;i<ROW;++i) arr[i]=(int*)malloc(COL*sizeof(int)); printf("%d\n",arr[ROW-1][COL-1]); for(i=0;i<ROW;++i) free(arr[i]); free(arr); }