int **array; array = malloc(m * sizeof(int *)); for ( int i = 0; i < m; i++ ) array[i] = malloc(n * sizeof(int));