Compartir a través de


basic_streambuf::pubseekpos

Calls seekpos, a protected virtual function that is overridden in a derived class, and resets the current pointer position.

pos_type pubseekpos(
   pos_type _Sp,
   ios_base::openmode _Which = ios_base::in | ios_base::out
);

Parameters

  • _Sp
    The position to seek for.

  • _Which
    Specifies the mode for the pointer position. The default is to allow you to modify the read and write positions.

Return Value

The new position or an invalid stream position. To determine if the stream position is invalid, compare the return value with pos_type(off_type(-1)).

Remarks

The member function returns seekpos(_Sp, _Which).

Requirements

Header: <streambuf>

Namespace: std

See Also

Reference

basic_streambuf Class

iostream Programming

iostreams Conventions

Other Resources

basic_streambuf Members