Added C++ examples #29-31