next up previous contents
Next: Building a List: Up: The CHAR_SLLIST Implementation Details: Previous: The Overloaded Equal:

The Destructor Call for the SLLIST class:

We start with a call to the destructor for the previous pointer. Note that we are using a static counter, count, to implement a nested indentation strategy for our diagnostic messages from the destructor calls.

    // *************************************** //
    // destructor for CHAR_SLLIST class        //
    // *************************************** //
 
CHAR_SLLIST::~CHAR_SLLIST()
{
  if(head!=NULL){
    delete head;  
    }
}



 

Jim Peterson
1999-04-22