// StackType.h in StackType3/

//templated
//stack is implemented by dynamically allocated array

template<class ItemType>
class StackType
{
public:
    StackType(int max); // max is stack size.
    StackType();        // Default size is 500.
    ~StackType();//destructor needed in class with dynamically allocated memory
    void MakeEmpty();
    bool IsEmpty() const;
    bool IsFull() const;
    void Push(ItemType item);
    void Pop(ItemType& item);

private:
    int top;
    int maxStack;       // Maximum number of stack items.
    ItemType* items;    // Pointer to dynamically allocated memory.
};

#include "StackType.cpp"
