M
Markus
Hi,
I have read the FAQ 6.16 on how to dynamically allocate a
two-dimensional array.
I do it like this:
double** A = (double **)malloc(m * sizeof(double *));
for(i = 0; i < m; i++)
A = (double *)malloc(n * sizeof(double));
But how do I free it? I currently have only
free(A);
but I guess it is not enough.
The FAQ is not clear about this.
TIA
markus
I have read the FAQ 6.16 on how to dynamically allocate a
two-dimensional array.
I do it like this:
double** A = (double **)malloc(m * sizeof(double *));
for(i = 0; i < m; i++)
A = (double *)malloc(n * sizeof(double));
But how do I free it? I currently have only
free(A);
but I guess it is not enough.
The FAQ is not clear about this.
TIA
markus