When you post a followup, please quote enough context from the parent
article so that your followup makes sense to someone who hasn't seen
the parent article.
Google Groups already does this for you. Just delete any quoted
material that isn't relevant to what you're saying and leave the rest
in place (along with the attribution line, the one that says
"So-and-so writes:").
--
Keith Thompson (The_Other_Keith) (e-mail address removed) <
http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Thank u....And I do think it is because the array is too big and there
is the code written by Dann and the result is
ERROR: Not all lat data read. You can try to solve it
here.
P.S.\nTrying to read 2,748,620 * sizeof long bites in one
gulp is iffy
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
static long lati[2030][1354],
loni[2030][1354];
int main()
{
FILE *lat;
FILE *lon;
lat = fopen("MOD021KM.A2005243.0255.005.2008027115345.lat", "r");
lon = fopen("MOD021KM.A2005243.0255.005.2008027115345.lon", "r");
if (lat != NULL && lon != NULL) {
size_t lat_read,
lon_read;
lat_read = fread(lati, sizeof(lati), 1, lat);
lon_read = fread(loni, sizeof(loni), 1, lon);
if (lat_read != sizeof lati) {
puts("ERROR: Not all lat data read. You can try to solve
it here.\t");
puts("P.S.\nTrying to read 2,748,620 * sizeof long bites
in one gulp is iffy.\t");
exit(EXIT_FAILURE);
}
if (lon_read != sizeof loni) {
puts("ERROR: Not all lon data read. You can try to solve
it here.\t");
puts("P.S.\nTrying to read 2,748,620 * sizeof long bites
in one gulp is iffy.\t");
exit(EXIT_FAILURE);
}
printf("The 00 is %ld", lati[0][0]);
fclose(lat);
fclose(lon);
} else {
perror("ERROR: Unable to open one or more input file");
exit(EXIT_FAILURE);
}
return 0;
}