[C++-sig] fault core dump error

sam asu_mcs at yahoo.com
Mon Sep 30 18:11:15 CEST 2013


Thank you Jonathan for your quick response.

well, i did move it. still same problem. it has something to do with memory


--------------------------------------------
On Mon, 9/30/13, Jonathan WRIGHT <wright at esrf.fr> wrote:

 Subject: Re: [C++-sig] fault core dump error
 To: cplusplus-sig at python.org
 Date: Monday, September 30, 2013, 9:49 AM
 
 Hello,
 You are reading on a closed file, try moving the fclose to
 the other 
 side of the curly bracket.
 HTH,
 Jon
     
 >        fpr =
 fopen(filename, "r");
 >     
 >        for
 (h=0;h<HEIGHT;h++)
 >        {
 >        array1[h] =
 (double *) malloc(WIDTH*sizeof(double));
 >     
 >
 >          
 fscanf(fpr, "%lf",  &array1 [h][w]);
 >         
 >            
 fclose(fpr);
 >        
     
 >        }
 >
 _______________________________________________
 Cplusplus-sig mailing list
 Cplusplus-sig at python.org
 https://mail.python.org/mailman/listinfo/cplusplus-sig
 


More information about the Cplusplus-sig mailing list