Checks if array contains any elements. More...

bool isempty () const
 Checks if array contains any elements. More...
 

Detailed Description

Checks if array contains any elements.

Returns true if the array does not contain any elements. False otherwise.

array a(1);
if(a.isempty())
return -1; //Will not happen as \c a contains an element
array b(0);
if(b.isempty())
return 0; //\c b is empty therefore 0 will be returned;
return 1; //Code will not be reached

Function Documentation

bool isempty ( ) const

Checks if array contains any elements.

Returns true if the array does not contain any elements. False otherwise.

array a(1);
if(a.isempty())
return -1; //Will not happen as \c a contains an element
array b(0);
if(b.isempty())
return 0; //\c b is empty therefore 0 will be returned;
return 1; //Code will not be reached
Returns
True if the array does not contain any elements. False otherwise