CAtlList::RemoveHead
调用此方法移除元素列表的开头。
E RemoveHead( );
返回值
返回元素列表的开头。
备注
head元素从列表中删除,并且,内存被释放。 元素的副本返回。 如果列表为空,在调试版本中,断言失败将发生。
示例
// Define the integer list
CAtlList<int> myList;
// Populate the list
myList.AddTail(100);
myList.AddTail(200);
myList.AddTail(300);
// Confirm the head of the list
ATLASSERT(myList.GetHead() == 100);
// Remove the head of the list
ATLASSERT(myList.RemoveHead() == 100);
// Confirm the new head of the list
ATLASSERT(myList.GetHead() == 200);
要求
Header: atlcoll.h