Exercise solution of C++ Primer (5ed.)