C++ Code to Hitchhiker's Guide Solutions