// *************************************** //
// get the number of elements in the list //
// *************************************** //
int CHAR_DLLIST::get_number_elements()
{
//cout << "entering get_number_of_elements " << endl;
if(head==NULL) return(0);
else{
//cout << "head = " << *head;
int i = 1;
CHAR_DL_CELL *again;
again = head->next;
while(!(again==NULL)){
//cout << "again = " << *again;
++i;
again = again->next;
}
//cout << "leaving get_number_of_elements " << endl;
return(i);
}
}