The ANSI/ISO-approved standard for the C++ language and library does not specify how pword() and iword() indicate failure, so this feature is dependent on the particular implementation of the library you are using. This Rogue Wave implementation uses operator new for allocating these arrays, which means that bad_alloc will be thrown.
The standard also doesn't specify what happens if iword() or pword() are provided with an index that was not returned by a previous call to xalloc(). This Rogue Wave implementation allocates as much memory as necessary to provide the requested array entry.
OEM Edition, ©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.