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::seekoff
streambuf                                   Up Contents Index Back
──The Microsoft iostream Classes────────────────────────────────────────────
 
  virtual streampos seekoff( streamoff off, ios::seek_dir dir,
                             int nMode = ios::in | ios::out );
 
  Parameter   Description
 
  <off>       The new offset value; streamoff is a typedef equivalent to
              long.
 
  <dir>       The seek direction specified by the enumerated type
              seek_dir, as follows:
 
              Value      Meaning
 
              ios::beg   Seek from the beginning of the stream.
 
              ios::cur   Seek from the current position in the stream.
 
              ios::end   Seek from the end of the stream.
 
  <nMode>     An integer that contains a bitwise-OR (|) combination of the
              enumerators ios::in and ios::out.
 
  Remarks
 
  Changes the position 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
 
  Returns EOF.
 
  Return Value
 
  The new position value. This is the byte offset from the start of the
  file (or string). 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::seekpos
 
 
                                     -♦-