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>istream::tellg</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
istream::tellg

Usage

   #include <iostream.hpp>

   streampos istream::tellg();

Description

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

Example 

   ifstream ifs("input.dat");
   ...;
   streampos sp = ifs.tellg();
   ifs.seekg(0);       // position at start of file
   ...;
   ifs.seekg(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