struct Node { // a node in the stack Object element; // element Node* next; // next pointer Node(const Object& e = Object(), Node* n = NULL) : element(e), next(n) { } // constructor }; typedef Node* NodePtr; // pointer type to node