CList::InsertAfter
POSITIONInsertAfter(POSITIONposition**,ARG_TYPEnewElement);**
Return Value
A POSITION value that can be used for iteration or list element retrieval.
Parameters
position
A POSITION value returned by a previous GetNext, GetPrev, or Find member function call.
ARG_TYPE
Template parameter specifying the type of the list element.
newElement
The element to be added to this list.
Remarks
Adds an element to this list after the element at the specified position.
Example
// Define myList.
CList<CString,CString&> myList;
// Add three elements to the list.
POSITION pos = myList.AddHead(CString("XYZ"));
pos = myList.InsertAfter(pos, CString("ABC"));
pos = myList.InsertAfter(pos, CString("123"));
// Verify the tail element is what's expected.
ASSERT(CString("123") == myList.GetTail());
CList Overview | Class Members | Hierarchy Chart
See Also CList::Find, CList::InsertBefore