다음을 통해 공유


ios_base::iword

Assigns a value to be stored as an iword.

long& iword( 
   int idx 
);

매개 변수

  • idx
    The index of the value to store as an iword.

설명

The member function returns a reference to element idx of the extensible array with elements of type long. All elements are effectively present and initially store the value zero. The returned reference is invalid after the next call to iword for the object, after the object is altered by a call to basic_ios::copyfmt, or after the object is destroyed.

If idx is negative or if unique storage is unavailable for the element, the function calls setstate(badbit) and returns a reference that might not be unique.

To obtain a unique index, for use across all objects of type ios_base, call xalloc.

예제

See xalloc for a sample of how to use iword.

요구 사항

Header: <ios>

네임스페이스: std

참고 항목

참조

ios_base 클래스

iostream 프로그래밍

iostreams 규칙