c++ home assignment