ostream::seekp

ostream&seekp(streampospos**);**

ostream&seekp(streamoffoff**,ios::seek_dirdir);**

Parameters

pos

The new position value; streampos is a typedef equivalent to long.

off

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

dir

The seek direction specified by the enumerated type ios::seek_dir, with values including:

  • 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.

Remarks

Changes the position value for the stream. Not all derived classes of ostream need support positioning. For file streams, the position is the byte offset from the beginning of the file; for string streams, it is the byte offset from the beginning of the string.

ostream OverviewOutput Stream Classes

See Also   ostream::tellp, istream::seekg, istream::tellg