C++Homework