R
Raj
Hi,
I would like to copy an array into a data file (ASCII) format. I
would like to know if the following syntax is correct. ff is the
required array i want to be written in the data file. Thank you
Raj. R
--------------------------------------------------------------------------------------------
float xcentr1,ycentr1,zcentr1;
float *ffpoint=NULL;
int n,i;
float ff[3][1000];
FILE *centro;
centro=fopen("cx.txt","w");
ffpoint=*ff;
ff[1][n]=xcentr1;
ff[2][n]=ycentr1;
ff[3][n]=zcentr1;
------- /* Get OUTPUTS TO DATA FILE*/-----------------
for(i=0;i<3;i++){
fwrite(ffpoint,1,sizeof(ffpoint),centro);
fclose("cx.txt");}
------------------------------------------------------------------------------
I would like to copy an array into a data file (ASCII) format. I
would like to know if the following syntax is correct. ff is the
required array i want to be written in the data file. Thank you
Raj. R
--------------------------------------------------------------------------------------------
float xcentr1,ycentr1,zcentr1;
float *ffpoint=NULL;
int n,i;
float ff[3][1000];
FILE *centro;
centro=fopen("cx.txt","w");
ffpoint=*ff;
ff[1][n]=xcentr1;
ff[2][n]=ycentr1;
ff[3][n]=zcentr1;
------- /* Get OUTPUTS TO DATA FILE*/-----------------
for(i=0;i<3;i++){
fwrite(ffpoint,1,sizeof(ffpoint),centro);
fclose("cx.txt");}
------------------------------------------------------------------------------