Sept. 30, 2013
3:49 p.m.
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);
}