Hi !
I have allocated the "ptr_matrix" - 2D array
by means of the malloc(...) function
and then inserted the "ptr_matrix" array
into ArrayToFile(...) function to save
to file "file.dat".
Unfortunately while the function
start occurs error ... Why ?
Below there are a snippet of my program:
=====================
double **ptr_matrix;
void main(void)
{
int k,i,l,n; // n-number o the rows, k-number of the columns
scanf ("%d%d", &n, &k);
ptr_matrix=malloc(n*sizeof(double *));
for(i=0; i *(ptr_matrix+i) = malloc(k*sizeof(double));
for(i=0; i for(l=0; l ptr_matrix[i][l] = 10.0;
// here occurs error when the program start
ArrayToFile ("file.dat", ptr_matrix, VA
L_DOUBLE, n*k, n,
VAL_GROUPS_TOGETHER, VAL_GROUPS_AS_ROWS, VAL_CONST_WIDTH,
10, VAL_ASCII, VAL_TRUNCATE);
}