c++homework