std::basic_istream::tellg

From Cppreference

Jump to: navigation, search
pos_type tellg();

Returns input position indicator of the current associated streambuf object.

Essentially calls rdbuf()->pubseekoff(0, std::ios_base::cur, std::ios_base::in).

Contents

[edit] Parameters

(none)

[edit] Return value

current input position indicator on success, -1 if a failure (fail() != false) occurs.

[edit] Example

[edit] See also

seekg
sets the input position indicator
(public member function)
tellp
returns the output position indicator
(public member function of std::basic_ostream)
seekp
sets the output position indicator
(public member function of std::basic_ostream)