If the which parameter includes ios_base::in, the get pointer gptr is affected, and if the which parameter includes ios_base::out, the put pointer pptr. Both position pointers can be affected by a single call.
This member function overrides the virtual member streambuf::seekoff, which is called by member streambuf::pubseekoff.
Parameters
- off
- Offset value. This is relative to the way parameter.
It is a value of type streamoff. - way
- Object of type ios_base::seekdir. It may take any of the following constant values:
value offset is relative to... ios_base::beg beginning of the stream buffer ios_base::cur current position in the stream buffer ios_base::end end of the stream buffer - which
- Determines which of the internal position pointers shall be modified: the input pointer, the output pointer, or both. It is an object of type ios_base::openmode that for this function may take any combination of the following significant constant values:
value position pointer affected ios_base::in Modify get pointer position ios_base::out Modify put pointer position
Return Value
The new position value of the modified position pointer. If the position was invalid, the function returns a value of -1 to signal failure.Basic template member declaration
( basic_filebuf<charT,traits,Allocator> )| 1 2 3 |
|
See also
| filebuf::seekpos | Set internal position pointer to absolute position (virtual protected member function) |
| streambuf::pubseekoff | Set internal position pointer to relative position (public member function) |
