streambuf::seekoff

virtual streampos seekoff( streamoff off, ios::seek_dir dir, int nMode = ios::in | ios::out );

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, the function returns the output position. If the derived class does not support positioning, the function returns EOF.

Parameters

off

The new offset value; streamoff is a typedef equivalent to long.

dir

One of the following seek directions specified by the enumerated type seek_dir:

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.

streambuf OverviewStream Buffer Classes

See Also   streambuf::seekpos