リストの先頭に既存のリストを追加します。
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
必要条件
**ヘッダー:**atlcoll.h