X
xiao
Hey ~ everyone~
What does this error mean?
*** glibc detected *** double free or corruption (!prev):
It occurs when i tried to write to a file like this :
Write2DArrayInt(tcumulus, ncolumns,nrows, out);
Write2DArrayInt is a function like this:
void Write2DArrayInt(short int **Array, int Columns, int Rows, FILE
*fp)
{
int i;
for(i=0; i<Rows; i++){
fwrite(Array, sizeof(short int),Columns, fp);
}
fclose(fp);
}
And tcumulus is defined as : short **tcumulus
What does this error mean?
*** glibc detected *** double free or corruption (!prev):
It occurs when i tried to write to a file like this :
Write2DArrayInt(tcumulus, ncolumns,nrows, out);
Write2DArrayInt is a function like this:
void Write2DArrayInt(short int **Array, int Columns, int Rows, FILE
*fp)
{
int i;
for(i=0; i<Rows; i++){
fwrite(Array, sizeof(short int),Columns, fp);
}
fclose(fp);
}
And tcumulus is defined as : short **tcumulus