std::basic_ostream<CharT,Traits>::tellp (3) - Linux Manuals
std::basic_ostream<CharT,Traits>::tellp: std::basic_ostream<CharT,Traits>::tellp
NAME
std::basic_ostream<CharT,Traits>::tellp - std::basic_ostream<CharT,Traits>::tellp
Synopsis
pos_type tellp();
Returns the output position indicator of the current associated streambuf object.
Behaves as UnformattedOutputFunction (except without actually performing output). After constructing and checking the sentry object, (since C++11)
If fail()==true, returns pos_type(-1). Otherwise, returns rdbuf()->pubseekoff(0, std::ios_base::cur, std::ios_base::out).
Parameters
(none)
Return value
current output position indicator on success, pos_type(-1) if a failure occurs.
Example
// Run this code
Output:
See also
seekp (public member function)
tellg (public member function of std::basic_istream<CharT,Traits>)
seekg (public member function of std::basic_istream<CharT,Traits>)