CArray::operator [ ]

These subscript operators are a convenient substitute for the SetAt and GetAt functions.

The first operator, called for arrays that are not const, may be used on either the right (r-value) or the left (l-value) of an assignment statement. The second, called for const arrays, may be used only on the right.

TYPE& operator []( int nIndex );

TYPE operator []( int nIndex ) const;

At a Glance

Header file: Afxtempl.h
Platforms:
Versions: 1.0 and later
Complete documentation: Visual C++ documentation

See Also

CArray Overview, CArray Operators, CArray::GetAt, CArray::SetAt, CArray::ElementAt