#ifndef STACK_H_ #define STACK_H_ #include typedef double Item; class Stack { public: Stack(); ~Stack(); bool isEmpty() const { return myCount == 0; } bool isFull() const { return false; } void push(const Item& newItem); Item getTop() const; Item pop(); private: struct Node { Node(const Item& item); Node(const Item& item, Node* next); // ~Node(); Item myItem; Node* myNext; }; Node* myTop; unsigned myCount; }; #endif /*STACK_H_*/