cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : IOstream Library : ios_base : pword
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forum
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
IOstream Library
manipulators
classes:
· filebuf
· fstream
· ifstream
· ios
· iostream
· ios_base
· istream
· istringstream
· ofstream
· ostream
· ostringstream
· streambuf
· stringbuf
· stringstream
objects:
· cerr
· cin
· clog
· cout
types:
· fpos
· streamoff
· streampos
· streamsize
ios_base
· ios_base::ios_base
· ios_base::~ios_base
member classes:
· ios_base::failure
· ios_base::Init
member functions:
· ios_base::flags
· ios_base::getloc
· ios_base::imbue
· ios_base::iword
· ios_base::precision
· ios_base::pword
· ios_base::register_call...
· ios_base::setf
· ios_base::sync_with_stdio
· ios_base::unsetf
· ios_base::width
· ios_base::xalloc
member types:
· ios_base::event
· ios_base::event_callback
· ios_base::fmtflags
· ios_base::iostate
· ios_base::openmode
· ios_base::seekdir

-

ios_base::pword public member function
void* & pword (int idx);

Get reference to pointer of the internal extensible array

Returns a reference to the pointer element correponding to the index idx of the internal extensible array. If idx is an index to a new element and the internal extensible array is not long enough (or is not yet allocated), the function extends it (or allocates it) with as many zero-initialized elements as necessary.

idx should be a value previously returned by xalloc.

The refence returned is granted to be valid at least until another operation is performed on the stream object, including another call to pword. Once another operation is performed, the reference may become invalid, although a subsequent call to this same function with the same idx argument will return a value referring to the same pointer within the internal extensible array.

The internal extensible array is a general-purpose array of word-sized elements associated with a stream object that can be used to temporarily store data.

Parameters

idx
The index value of an element of the internal extensible array.
This value should have been obtained by a previous call to xalloc.

Return Value

A reference to the element in the internal extensible array whose index is idx.
This value is returned as a reference to an object of type void*.
On failure, a valid void*& initialized to 0 is returned.

See also

ios_base::xalloc Return a new index for the internal extensible array [static] (public static member function)
ios_base::iword Get reference to integer element of the internal extensible array (public member function)

© The C++ Resources Network, 2000-2007 - All rights reserved
Spotted an error? - contact us