streambuf::seekpos
[virtual] [protected] streampos seekpos ( streampos sp, ios_base::openmode which = ios_base::in | ios_base::out ); | streambuf |
cplusplus.com |
Set position of internal position pointer.
This member is called to set a new value for the position pointer in a
streambuf-derived object.
Its default behavior for this class is just to return an invalid position.
This is a virtual member function that should be redefined in
derived classes to behave as expected setting an absolute new position
(sp) in the stream for the position pointers specified by
parameter which.
Standard class filebuf redefines this specifically for filebuf objects
(filebuf::seekpos).
Parameters.
Return Value.
The new position value of the modified position pointer.
In case of error the value returned is an invalid position.
Basic template member declaration ( basic_streambuf<charT,traits> ):
typedef traits::pos_type pos_type; pos_type seekpos (pos_type sp, ios_base which = ios_base::in | ios_base::out ); |
See also.
pubseekpos,
filebuf::seekpos
streambuf class