ios_base::iword
Assigns a value to be stored as an iword.
long& iword(
int _Idx
);
Parameters
- _Idx
The index of the value to store as a pword.
Remarks
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.
Example
See xalloc for a sample of how to use iword.
Requirements
Header: <ios>
Namespace: std