次の方法で共有


CList::IsEmpty

リストに要素があるかどうかを示します。

BOOL IsEmpty( ) const;

戻り値

リストが空の場合は 0 以外を返します。それ以外の場合は 0 を返します。

使用例

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

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

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

必要条件

**ヘッダー:**afxtempl.h

参照

参照

CList クラス

階層図

CList::GetCount

その他の技術情報

CList のメンバー