Skip to main content Link Menu Expand (external link) Document Search Copy Copied

bool empty()

Returns true if the list has no elements

Returns

A boolean that is true if the list is empty, false otherwise

Example

LinkedList<int> list = {};
list.empty();
//returns true
list.pushBack(3);
list.empty();
//returns false