From Cppreference
Sets input position indicator of the current associated streambuf object. In case of failure, calls setstate(std::ios_base::failbit).
1) sets the input position indicator to absolute (relative to the beginning of the file) value pos. Specifically calls rdbuf()->pubseekpos(pos, std::ios_base::in).
2) sets the input position indicator to position off, relative to position, defined by dir. Specifically rdbuf()->pubseekoff(off, dir, std::ios_base::in).
[edit] Parameters
pos
|
-
|
absolute position to set the input position indicator to.
|
off
|
-
|
relative position to set the input 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 input position indicator (public member function)
|
|
|
returns the output position indicator (public member function of std::basic_ostream)
|
|
|
sets the output position indicator (public member function of std::basic_ostream)
|