Use these subscript operators as a convenient substitute for the SetAt and GetAt functions.
The first operator, called for arrays that are not const, can be used on either the right (r-value) or the left (l-value) of an assignment statement. The second, invoked for const arrays, can be used only on the right.
TYPE& operator[ ]( int nIndex );
TYPE operator[ ]( int nIndex ) const;
Header file: | Afxtempl.h |
Platforms: | |
Versions: | 1.0 and later |
Complete documentation: | Visual C++ documentation |
CTypedPtrArray Overview, CTypedPtrArray Operators, Typed Template Collections, CObArray::operator []