看msdn啊,比如关于addtail的例子
CList::AddTail
// Define myList and myList2.
CList<CString,CString&> myList;
CList<CString,CString&> myList2;// Add elements to the end of myList and myList2.
myList.AddTail(CString("A"));
myList.AddTail(CString("B"));
myList2.AddTail(CString("C"));
myList2.AddTail(CString("D"));// There are two versions of CList::AddTail: one adds a single
// element to the end of the list, the second adds another list
// to the end. // This adds the string "ABC" to the end of myList.
// myList is a list of CStrings (ie defined as CList<CString,CString&>).
myList.AddTail(CString("ABC"));
ASSERT(CString("ABC") == myList.GetTail());// The adds the elements of myList2 to the end of myList.
myList.AddTail(&myList2);

解决方案 »

  1.   

    这个例子成立吗,好象CList中的成员函数操作的对象都是CObject的派生类对象才可以吧,不如直接用CStringList的好!
    其实他的两个参数第一个是链表中的元素的类型,后面的是成员函数参数的类型。
      

  2.   

    你说的是CObList吧
    The CObList class supports ordered lists of nonunique CObject pointers accessible sequentially or by pointer value. CObList lists behave like doubly-linked lists. 
      

  3.   

    I'm sorry,是我的疏忽,请原谅我的错误,您说的正确,我错把COblist当成CLlist了.