CList::IsEmpty

BOOLIsEmpty()const;

Return Value

Nonzero if this list is empty; otherwise 0.

Remarks

Indicates whether this list contains no elements.

Example

// Define myList.
CList<CString,CString&> myList;

// Add three elements to the list.
myList.AddTail(CString("XYZ"));
myList.AddTail(CString("ABC"));
myList.AddTail(CString("123"));

// Remove the head element until the list is empty.
CString str;
while (!myList.IsEmpty())
{
   str = myList.RemoveHead();
   TRACE("%s\r\n", (LPCSTR) str);
}

CList OverviewClass MembersHierarchy Chart

See Also   CList::GetCount