Examples from "C++ The Complete Reference" 4th edition