CAtlList::AddHeadList

呼叫這個方法會將現有的清單加入至清單的開頭。

void AddHeadList(
   const CAtlList< E, ETraits >* plNew 
);

參數

  • plNew
    要加入的清單。

備註

清單所指向的 plNew 上述清單中的現有清單的開頭插入。如果 plNew 具有 null 值,等於在偵錯組建中,判斷提示失敗時會發生。

範例

// Define two lists of integers
CAtlList<int> myList1;
CAtlList<int> myList2;

// Fill up the first list
myList1.AddTail(1);
myList1.AddTail(2);
myList1.AddTail(3);

// Add an element to the second list
myList2.AddTail(4);

// Insert the first list into the second
myList2.AddHeadList(&myList1);

// The second list now contains:
// 1, 2, 3, 4   

需求

Header: atlcoll.h

請參閱

參考

CAtlList 類別

CAtlList::AddHead

CAtlList::AddTailList