ios_base::seekdir type — Seek direction
typedef . . . seekdir typedef . . . seek_dir static const seekdir beg static const seekdir cur static const seekdir end
The ios_base::seekdir
type
is an implementation-defined enumerated type that specifies the
origin for seeking to a new file position. The seek_dir
type is an integral type that
represents the same information. Some functions that take a seekdir
parameter have overloaded versions
that accept a seek_dir
parameter
and have the same functionality as their seekdir
counterparts. The seek_dir
type and related functions are
deprecated, so you should use the seekdir
versions.
Table 13-17
lists the seekdir
literals. Note
that the order and integer values of the literals are
implementation-defined.
Table 13-17. seekdir literals
Literal | Description |
---|---|
Seeks from the beginning of the stream (e.g., offset is absolute position) | |
Seeks from the current position; positive is toward end of stream, and negative offsets are toward the beginning of the stream | |
Seeks relative to the end of the stream; negative offsets are towards the beginning |