#define ROW 5 #define COLUMN 5 void func(int **array, int row, int column) { .... } int main() { int **aa; aa = (int**)malloc(sizeof(int*)*ROW); // ROW is known for(int row=0; row<ROW; row++) { aa[row] = (int*)malloc(sizeof(int)*COLUMN); // COLUMN is known } func(aa, ROW, COLUMN); return 0; }
沒有留言:
張貼留言