Homework/HW02/List.cc
void List::makeEmpty()
{
    if (size) // if the list is not empty
    {
        deleteList(head); // call the function from ListNode.cc
        head = NULL; // then reset the data
        tail = NULL;
        size = 0;
    }
}
// Deletes the entire list and reset all the data.
Deletes the entire list and reset all the data.
Deletes the entire list and reset all the data .
void List::makeEmpty()
{
    if (size) 
    {
        deleteList(head); 
        head = NULL; 
        tail = NULL;
        size = 0;
    }
}
void List :: makeEmpty ( ) { if ( size ) { deleteList ( head ) ; head = NULL ; tail = NULL ; size = 0 ; } }
Deletes the entire list and reset all the data.
Deletes the entire list and reset all the data .
// if the list is not empty // call the function from ListNode.cc // then reset the data