CTypedPtrArray::operator [ ]

These subscript operators are used as convenient substitutes for the SetAt and GetAt methods.

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.

At a Glance

Header file: Afxtempl.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

TYPE& operator[ ]( int nIndex );

TYPE operator[ ]( int nIndex ) const;

See Also

CObArray::operator []