Compartilhar via


CAtlArray::IsEmpty

Call this method to test if the array is empty.

bool IsEmpty( ) const throw( );

Return Value

Returns true if the array is empty, false otherwise.

Remarks

The array is said to be empty if it contains no elements. Therefore, even if the array contains empty elements, it is not empty.

Example

// Define an array of chars
CAtlArray<char> cArray;

// Add an element
cArray.Add('a');

// Confirm array is not empty
ATLASSERT(!cArray.IsEmpty());

// Remove all elements
cArray.RemoveAll();

// Confirm array is empty
ATLASSERT(cArray.IsEmpty());   

Requirements

Header: atlcoll.h

See Also

Reference

CAtlArray Class

CAtlArray::AssertValid