i want to allocate a matrix.
is this the only option:
int** mat = (int**)malloc(rows * sizeof(int*)) for (int index=0;index
what you can do is
int (*mat)[col]; mat=(int (*)[col])malloc(sizeof(*mat)*row);
and then use this new matrix as mat[i][j]