Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves an element from the array.
T& operator[](
int nIndex
);
Parameters
- nIndex
The element index.
Return Value
Returns the element of the array referenced by nIndex.
Example
// Create an array and display its contents
CSimpleArray<int> iMySampleArray;
for (int i = 0; i < 10; i++)
iMySampleArray.Add(i);
for (int i = 0; i < iMySampleArray.GetSize(); i++)
_tprintf_s(_T("Array index %d contains %d\n"), i, iMySampleArray[i]);
Requirements
Header: atlsimpcoll.h