The parameter which determines which of the position pointers is affected: either the get pointer gptr or the put pointer pptr, or both.
Parameters
- off
- Offset value. This is relative to the way parameter.
It is a value of type streamoff, which can be implicitly constructed from an integral value. - 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.Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
This program prints out the size of file test.txt using the value returned by pubseekoff when it repositions the position pointer to the end of the file buffer.
Basic template member declaration
( basic_streambuf<charT,traits> )| 1 2 3 |
|
See also
| streambuf::pubseekpos | Set internal position pointer to absolute position (public member function) |
| streambuf::seekoff | Set internal position pointer to relative position (virtual protected member function) |
