From Cppreference
Sets output position indicator of the current associated streambuf object. In case of failure, calls setstate(std::ios_base::failbit).
1) sets the output position indicator to absolute (relative to the beginning of the file) value pos. Specifically calls rdbuf()->pubseekpos(pos, std::ios_base::out).
2) sets the output position indicator to position off, relative to position, defined by dir. Specifically rdbuf()->pubseekoff(off, dir, std::ios_base::out).
[edit] Parameters
pos
|
-
|
absolute position to set the output position indicator to.
|
off
|
-
|
relative position to set the output position indicator to.
|
dir
|
-
|
defines base position to apply the relative offset to. It can be one of the following constants:
|
Constant
|
Explanation
|
|
beg
|
the beginning of a stream
|
|
end
|
the ending of a stream
|
|
cur
|
the current position of stream position indicator
|
|
[edit] Return value
*this
[edit] Example
[edit] See also
|
|
returns the output position indicator (public member function)
|
|
|
returns the input position indicator (public member function of std::basic_istream)
|
|
|
sets the input position indicator (public member function of std::basic_istream)
|