#ifndef NODE_H_ #define NODE_H_ using namespace std; template class Node { public: // create a node with value newValue and next field nextElt Node(T newValue, Node * nextElt = NULL): value(newValue),next(nextElt){} Node(const Node & other): value(other.value),next(other.next) {} // destroy Node ~Node() {} // make newValue the new value void setValue(T newValue){ value = newValue; } // return value T getValue() const { return value; } // pop elt from the stack Node * getNext() const { return next; } // return top element from the stack void setNext(Node *newNext) { next = newNext; } private: T value; Node *next; }; #endif /*NODE_H_*/