fixed stack.cpp