tellg and tellp

#include <iostream.h>streampos tellg();streampos tellp():

The tellg( ) function is a member of istream, and tellp( ) is a member of ostream.

The C++ I/O system manages two pointers associated with a file. One is the get pointer, which specifies where in the file the next input operation will occur. The other is the put pointer, which specifies where in the file the next output operation will occur. Each time an input or an output operation takes place, the appropriate pointer is automatically sequentially advanced. You can determine the current position of the get pointer using tellg( ) and of the put pointer using tellp( ).

streampos is a type defined in iostream.h that is capable of holding the largest value that either function can return.

The values returned by tellg( ) and tellp( ) can be used as parameters to seekg( ) and seekp( ), respectively.

Related functions are seekg( ) and seekp( ).

C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net