Freigeben über


CTypedPtrArray::operator [ ]

These inline operators call BASE_CLASS**::operator [ ]**.

TYPE& operator[ ](
   INT_PTR nIndex 
);
TYPE operator[ ](
   INT_PTR nIndex 
) const;

Parameters

  • TYPE
    Template parameter specifying the type of elements stored in the array.

  • nIndex
    An integer index that is greater than or equal to 0 and less than or equal to the value returned by BASE_CLASS**::GetUpperBound**.

Remarks

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.

The Debug version of the library asserts if the subscript (either on the left or right side of an assignment statement) is out of bounds.

Requirements

Header: afxtempl.h

See Also

Concepts

CTypedPtrArray Class

CTypedPtrArray Members

Hierarchy Chart

CObArray::operator [ ]