求助啊,求助~
那位感人能指点一下,下面这段程序在写入数据的时候是怎么写入的啊? 是先循环14还是先循环800×800的数组?谢了~紧急啊~~~(NumY=NumY=800)void WriteCloudStats(GRIDDEF *griddef, char *StatsDir, int month, int year, short ****DataTable)
{
FILE *fptr[2];
int i,j,k,l;
char filename[200],command[250],monstr[5];
GRIDDEF header;
if(month < 10)
sprintf(monstr,"0%d",month);
else
sprintf(monstr,"%d",month);
sprintf(filename,"%s/CldYearlyStats_%d_%d.dat",StatsDir,month,year);
sprintf(command,"/bin/cp %s %s.arc",filename,filename);
system(command);
fptr[0] = fopen(filename,"w");
sprintf(filename,"%s/CldTotalStats_%d.dat",StatsDir,month);
sprintf(command,"/bin/cp %s %s.arc",filename,filename);
system(command);
fptr[1] = fopen(filename,"w");
for(i=0; i<2; i++){
if(fptr[i] != NULL){
WriteHeader(griddef,fptr[i]);
for(j=0; j<14; j++)fwrite(
&DataTable[i][j][0][0],
sizeof(short),
griddef->NumX*griddef->NumY,
fptr[i]
);
printf("Data is %d \n",&DataTable[i][j][0][0]);
fclose(fptr[i]);
}
}
}