i want to allocate a matrix.
is this the only option:
int** mat = (int**)malloc(rows * sizeof(int*)) for (int index=0;index
The other answers already covered these, but for completeness, the comp.lang.c FAQ has a relevant entry:
How can I dynamically allocate a multidimensional array?