Cpp homework #2