Vector implementation of the stack (number conversion problem)