|
istream::tellgpublic member function
streampos tellg ( ); Get position of the get pointer. Returns the absolute position of the get pointer.The get pointer determines the next location in the input sequence to be read by the next input operation. ParametersnoneReturn ValueAn integral value of type streampos with the number of characters between the beginning of the input sequence and the current position.Failure is indicated by returning a value of -1. Example
In this example, tellg is used to get the position in the stream after it has been moved with seekg to the end of the stream, therefore determining the size of the file. Basic template member declaration(basic_istream<charT,traits>)
See also
|