You never allocate space for the stack.
The way it's written, you need to pass the stack size into the constructor, and then it's fixed for the lifetime of the object; i.e. it won't grow automatically when you call
push(). You're not passing anything into the
Stack constructor, so the parameter is defaulting to
0, meaning it has zero size.
The solution is to declare the stack something like this:
(10 is just an arbitrary size -- use whatever you expect to need.)
Incidentally, there isn't an effective safeguard in your code to handle an empty stack. The result is that you're technically getting undefined behaviour at the moment when you call
push() (it's writing to arbitrary memory locations).