Call this member function to insert one or more elements at a specified index in an array.
The first version of InsertAt inserts one element (or multiple copies of an element) at a specified index in an array. In the process, it shifts up (by incrementing the index) the existing element at this index, and it shifts up all the elements above it.
The second version inserts all the elements from another CObArray collection, starting at the nStartIndex position.
void InsertAt( int nIndex, TYPE newElement, int nCount = 1 );
void InsertAt( int nStartIndex, CTypedPtrArray<BASE_CLASS, TYPE>* pNewArray );
Header file: | Afxtempl.h |
Platforms: | |
Versions: | 1.0 and later |
Complete documentation: | Visual C++ documentation |
CTypedPtrArray Overview, CTypedPtrArray Member Functions, Typed Template Collections, CObArray::InsertAt