Partilhar via


fpos Class

The template class describes an object that can store all the information needed to restore an arbitrary file-position indicator within any stream. An object of class fpos<St> effectively stores at least two member objects:

  • A byte offset, of type streamoff.

  • A conversion state, for use by an object of class basic_filebuf, of type St, typically mbstate_t.

It can also store an arbitrary file position, for use by an object of class basic_filebuf, of type fpos_t. For an environment with limited file size, however, streamoff and fpos_t may sometimes be used interchangeably. For an environment with no streams that have a state-dependent encoding, mbstate_t may actually be unused. Therefore, the number of member objects stored may vary.

For a list of all members of this type, see fpos Members.

template <class Statetype>
   class fpos

Parameters

  • Statetype
    State information.

Requirements

Header: <ios>

Namespace: std

See Also

Reference

Thread Safety in the Standard C++ Library

iostream Programming

iostreams Conventions

Other Resources

fpos Members

<ios> Members