Code created from exercises when working my way through textbook (C++ Primer 5th Ed. Lippman)