|
streambuf::seekoffvirtual protected member function
streampos seekoff ( streamoff off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out ); Set internal position pointer to relative position This member is called to set a new value for the position pointer in streambuf-derived objects. The public member function pubseekoff calls this protected member function to perform this action.This is a virtual member function that shall be redefined in derived classes to behave as expected by setting the internal pointer specified by which to a position offset off characters relative to the direction way. Its default behavior in streambuf is to do nothing and return the invalid position -1, but it is redefined in both standard derived classes, filebuf and stringbuf, to behave as expected specifically for each type of buffer (see filebuf::seekoff and stringbuf::seekoff). Parameters
Return ValueThe new position value of the modified position pointer.Errors are expected to be signaled by an invalid position value, like -1. Basic template member declaration( basic_streambuf<charT,traits> )
See also
|