class stack
{
public:
    stack();                    // create empty stack
    stack(stack&);              // create copy of stack
    ~stack();                   // destructor
    bool is_empty();            // return true if stack is empty
    void push(int);             // push an integer onto the stack
    int  pop();                 // pop the top integer from the stack

    struct new_error {};        // exception if new cannot allocate memory
    struct empty_pop {};        // exception if pop from an empty stack

private:
                                // omitted - not needed here
};