CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   A problem about class OFstream (https://www.cfd-online.com/Forums/openfoam-solving/58246-problem-about-class-ofstream.html)

jennyrui2008 December 5, 2008 03:55

I create a file using OFstream
 
I create a file using OFstream class as follows:

OFstream fFile
(
runTime.path()+"/F"
);

When I first run the program, "F" file is created and data is written. When I run the program for the second time, all the content in the "F" file is deleted and new data is written.

How could the new data append the old data in "F" file, rather than delete all the old data?

Thanks for your suggestion.


All times are GMT -4. The time now is 05:42.