ios_base::iword

long& iword(int idx);

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.

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