Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>ostream::tellp</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ostream::tellp

Usage

   #include <iostream.hpp>
   streampos ostream::tellp();

Description

   Returns the current "position" in the associated streambuf (see the
   sections on classes streambuf, filebuf and strstreambuf). The return
   value of tellp can be used as an argument to seekp to return to the same
   position later.

Example 

   ofstream ofs("output.dat");
   streampos sp = ofs.tellp();

   ofs.seekp(0);       // position at start of file
   ofs.put('\0');      // modify status or whatever
   ofs.seekp(sp);      // go back to whatever

Return Value

   A value of type streampos, a long in most implementations of IOStreams.




Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson