CList::RemoveAt

从此中移除指定元素的列表。

void RemoveAt(
   POSITION position 
);

参数

  • 定位
    从列表中移除的元素的位置。

备注

您必须确保 POSITION 值表示列表中的有效位置。 如果是无效的,则选件Microsoft基础类库的调试版本断言。

示例

// Define myList.
CList<CString,CString&> myList;

// Add three elements to the list.
myList.AddTail(CString(_T("XYZ")));
myList.AddTail(CString(_T("ABC")));
myList.AddTail(CString(_T("123")));

// Remove CString("ABC") from the list.
myList.RemoveAt(myList.FindIndex(1));

// Verify CString("ABC") is not in the list.
ASSERT(myList.Find(CString(_T("ABC"))) == NULL);      

要求

Header: afxtempl.h

请参见

参考

CList选件类

层次结构图

CList::RemoveAll