|
|
#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( ).
|
|