M
Mokkapati
Hi all,
I have data that has to be written successively, that is, this data is
updated at every step in the loop and I need to print this in a file.
So, I need something like, for every step, 1.dat, 2.dat....and so on.
If there are 100 successive output files, for that, I guess I need 100
file pointers to be initialized.
FILE *fp_1,*fp_2 and so on..
....
....
....
for (i=0;i<100;i++)
{
fp_no = fopen("C:\\loopno.dat","w");
fprintf(fp_no,"%d, %lf", x, y);
fclose(fp_no);
}
I was wondering as to how to do the above...I have been looking for
this since sometime. Can anyone suggest me something on this?
Thanks in advance.
Mokkapati
I have data that has to be written successively, that is, this data is
updated at every step in the loop and I need to print this in a file.
So, I need something like, for every step, 1.dat, 2.dat....and so on.
If there are 100 successive output files, for that, I guess I need 100
file pointers to be initialized.
FILE *fp_1,*fp_2 and so on..
....
....
....
for (i=0;i<100;i++)
{
fp_no = fopen("C:\\loopno.dat","w");
fprintf(fp_no,"%d, %lf", x, y);
fclose(fp_no);
}
I was wondering as to how to do the above...I have been looking for
this since sometime. Can anyone suggest me something on this?
Thanks in advance.
Mokkapati