damn c++ homework