다음을 통해 공유


fpos 클래스

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.

template <class Statetype> 
   class fpos

매개 변수

  • Statetype
    상태 정보입니다.

생성자

fpos

Create an object that contains information about a position (offset) in a stream.

멤버 함수

seekpos

Used internally by the Standard C++ Library only. Do not call this method from your code.

state

Sets or returns the conversion state.

연산자

operator!=

Tests file-position indicators for inequality.

operator+

Increments a file-position indicator.

연산자+=

Increments a file-position indicator.

operator-

Decrements a file-position indicator.

operator-=

Decrements a file-position indicator.

operator==

Tests file-position indicators for equality.

operator streamoff

Casts object of type fpos to object of type streamoff.

요구 사항

Header: <ios>

네임스페이스: std

참고 항목

참조

C++ 표준 라이브러리의 스레드 보안

iostream 프로그래밍

iostreams 규칙

기타 리소스

fpos 멤버

<ios> 멤버