Topic: tellp and seekp on ofstream in separate runs?


Author: axl@zedat.fu-berlin.de (Axel Thimm)
Date: 1996/03/08
Raw View
Hello,

I'd like to store a "filepointer position" to be able to find the same
writing position in a subsequent run. (I am doing some simulation
writing lots of numbers out. Saving the state of some internal vars with
the filepointers would make me able to restart the program from that
information and file position, if needed).
I hope that I can do this with the tellp and seekp methods of ofstream.
Tha draft (april 95) is not making a firm statement, that this should be
possible between subsequent runs. (After all there are other stream
types that loose they validity when the program finishes.)
I haven't checked out the latest draft, is there a clarification about
this?
Or is there another proposed way to accomplish the explained task
remaining within the standard?
I'd like to thank you in advance for any comments upon this.
 Axel Thimm.
===
Axel Thimm <axl@zedat.fu-berlin.de>
Freie Universitaet Berlin
===
---
[ To submit articles: try just posting with your news-reader.
                      If that fails, use mailto:std-c++@ncar.ucar.edu
  FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu.
]