Compartir a través de


ios_base::pword

Assigns a value to be stored as a pword.

void *& pword(
   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 void pointer. All elements are effectively present and initially store the null pointer. The returned reference is invalid after the next call to pword 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 an example of using pword.

Requirements

Header: <ios>

Namespace: std

See Also

Reference

ios_base Class

iostream Programming

iostreams Conventions

Other Resources

ios_base Members