c++ assignment #5 --1