Homework cpp