An OOP Implementation of a stack in c++