The stub of
push()
should look like this:
void Stack::push(const Item& it) { }
The
push()
method should behave as follows:
Store it in the entry of
myArray
whose index is
myTop
.
Add 1 to
myTop
.