CObList::AddTail
Bu liste tail için yeni bir öğe veya öğeler listesini ekler.
POSITION AddTail(
CObject* newElement
);
void AddTail(
CObList* pNewList
);
Parametreler
newElement
CObject Bu listeye eklenmesi için işaretçi.pNewList
İşaretçiyi başka bir CObList listesi.Öğeleri pNewList bu listeye eklenir.
Dönüş Değeri
İlk sürümü döndürür konumu yeni eklenen öğenin değeri.
Notlar
Liste operasyondan önce boş olabilir.
Diğer üye benzer işlevleri aşağıdaki tabloda gösterilmektedir CObList::AddTail.
Sınıf |
Üye işlevi |
---|---|
Konum AddTail (void *newElement); void AddTail (CPtrList *pNewList); |
|
Konum AddTail (const CString & newElement); Konum AddTail (lpctstrnewElement); void AddTail (CStringList *pNewList); |
Örnek
Bkz: CObList::CObList bir listesi için CAge sınıfı.
CObList list;
list.AddTail(new CAge(21));
list.AddTail(new CAge(40)); // List now contains (21, 40).
#ifdef _DEBUG
afxDump.SetDepth(1);
afxDump << _T("AddTail example: ") << &list << _T("\n");
#endif
Bu programdan sonuçlar aşağıdaki gibidir:
AddTail example: A CObList with 2 elements
a CAge at $444A 21
a CAge at $4526 40
Gereksinimler
Başlık: afxcoll.h