The Microsoft Input/Output Stream Classes (iostream.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
streambuf::seekpos
streambuf                                   Up Contents Index Back
──The Microsoft iostream Classes────────────────────────────────────────────
 
  virtual streampos seekpos( streampos pos,
                             int nMode = ios::in | ios::out );
 
  Parameter   Description
 
  <pos>       The new position value; streampos is a typedef equivalent to
              long.
 
  <nMode>     An integer that contains mode bits defined as ios
              enumerators that can be combined with the OR (|) operator.
              See ofstream::ofstream for a listing of the enumerators.
 
  Remarks
 
  Changes the position, relative to the beginning of the stream, for the
  streambuf object. Not all derived classes of streambuf need to support
  positioning; however, the filebuf, strstreambuf, and stdiobuf classes do
  support positioning.
 
  Classes derived from streambuf often support independent input and
  output position values. The <nMode> parameter determines which value(s)
  is set.
 
  Default Implementation
 
  Calls seekoff( (streamoff) <pos>, ios::beg, <nMode> ). Thus, to define
  seeking in a derived class, it is usually necessary to redefine only
  seekoff.
 
  Return Value
 
  The new position value. If both ios::in and ios::out are specified, then
  the function returns the output position. If the derived class does not
  support positioning, then the function returns EOF.
 
  See Also
 
  streambuf::seekoff
 
 
                                     -♦-