basic_stringbuf::seekpos

To alter an input or output stream position.

  virtual pos_type seekpos
     (pos_type sp,
     ios_base::openmode which = 
        ios_base::in | ios_base::out);  
Remarks

If the open mode is in or out, the function alters the stream position of both the input and output sequences. If the open mode is in, it alters the stream position of the input sequence. If the open mode is out, it alters the stream position of the output sequence. If sp is an invalid stream position, the operation fails and the return value is pos_type(off_type(-1)). Otherwise, the function returns the current new position.

If neither the in or out sequence is positioned, pos_type(off_type(-1)) is returned.

See Also

basic_streambuf::seekpos()