Accelerated C++ Solutions
I often recommend the book Accelerated C++, by Andrew
Koenig and Barbara E. Moo, to people
who are just beginning to learn the C++ language. While it is an excellent tutorial and a novel approach to
learning C++, one complaint I often hear is that there are no
solutions provided for the exercises. This page exists to remedy that problem.
I'll add solutions as I get the time. If you have any questions or comments, or if you find any
errors,
let me know.
About the Solutions
For each exercise there is a hint and at least one solution given. These are hidden by default and may be shown by
clicking on the appropriate link. The solutions are intended to be the simplest and most straightforward for the
problem at hand. Each applies material that the reader has covered. There is almost certainly more than one way to
solve each problem so the solutions you find here aren't the only correct answers, just the most appropriate in the
opinion of the author. The reader is encouraged to try alternative solutions.
The issue of code formatting is an ongoing "religious" debate among C++ developers, and will never be resolved. The
code provided in the solutions follows the same general formatting style used in the original book. Some of the
exercises alter this formatting somewhat as part of the problem; the solutions to these exercises will use the same
altered formatting when providing modifications or corrections to the exercise source.
The first exercise in each chapter instructs the reader to compile and execute the programs presented in the chapter. Except for
chapter 0, no solutions are provided for these exercises. The source code for the
programs in the book may be downloaded from the book's web site, http://www.acceleratedcpp.com/.