- FreeMode
- FreeMode
- Total
- IsSorted
- SortMode
- CreateElement
- Add
- Insert
- DetachCurrent
- DeleteCurrent
- Delete
- Clear
- IndexOf
- GetNodeAtIndex
- GetFirstNode
- GetPrevNode
- GetCurrentNode
- GetNextNode
- GetLastNode
- Sort
- MoveToIndex
- Exchange
- CompareList
- Search
- Save
- Load
- Type
Insert
Inserts an element to the specified position in the list.
int Insert(
|
Parameters
element
[in] value of the element to insert in the list
pos
[in] position in the list to insert
Return Value
index of inserted element - success, -1 - error.
Note
The element is not added to the list, if an invalid pointer (for example, NULL) is passed as a parameter.
Example:
//--- example for CList::Insert(CObject*,int)
|