This method inserts one or more elements at a specified index in an array.
The first implementation of InsertAt inserts one element or multiple copies of an element at a specified index in an array. In the process, it increments the index by one which shifts up all the elements above the new element.
The second implementation inserts all the elements from another CObArray collection, starting at the nStartIndex position.
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 |
void InsertAt( int nIndex, TYPE newElement, int nCount = 1 );
void InsertAt( int nStartIndex, CTypedPtrArray<BASE_CLASS,
TYPE>* pNewArray );