Homework Solution 2: stack.cc
// Private utility function count_items counts the number of
// items on the list. It does this recursively; if the list is
// NULL the length is 0. Otherwise, the length is 1 + the length
// of the tail of the list.
int stack::count_items(item *list)
return (1 + count_items(list->next));
// Constructor: initialize the linked list to NULL