CAtlArray::IsEmpty

CAtlArray::IsEmpty

 

Call this method to test if the array is empty.


bool IsEmpty( ) const throw( );

Returns true if the array is empty, false otherwise.

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

Show:
© 2016 Microsoft