Geert Arien

Accelerated C++ exercises

Coming from an educational background that was focused on managed programming languages such as Java and C#, I decided to get an introductory C++ book to make the switch to this unmanaged programming language. After some research I went with the compact (but dense) Accelerated C++, written by Andrew Koenig and Barbara E. Moo. This project contains my solutions to the end-of-chapter exercises found within the book.

Accelerated C++
Accelerated C++, published in 2000 by Addison-Wesley

Accelerated C++, part of Bjarne Stroustrup’s C++ In-Depth Series, takes a practical approach to teaching C++ by solving problems from the get go. It’s a compact book with a steep learning curve, it covers the same ground as similar books that are four times it’s size, which makes it a perfect book for people who’ve already been programming in other languages, such as myself.

The book covers the core C++ language as well as the standard-library. The first half concentrates on how to use the standard-library abstractions and the second half builds on this by teaching how to create your own abstractions. Covering everything from managing memory to advanced object-oriented techniques such as delegation and dynamic binding, this book has been a great tool to improve my C++ knowledge.

Below you can find the chapter titles along with a link to my solutions for that chapter. Don’t hesitate to leave comment below, or reach out to me in any other way, if you find an error or if you have a better solution to any of the exercises.

  • Chapter 0: Getting started
  • Chapter 1: Working with strings
  • Chapter 2: Looping and counting
  • Chapter 3: Working with batches of data
  • Chapter 4: Organizing programs and data
  • Chapter 5: Using sequential containers and analyzing strings
  • Chapter 6: Using library algorithms
  • Chapter 7: Using associative containers
  • Chapter 8: Writing generic functions
  • Chapter 9: Defining new types
  • Chapter 10: Managing memory and low-level data structures
  • Chapter 11: Defining abstract data types
  • Chapter 12: Making class objects act like values
  • Chapter 13: Using inheritance and dynamic binding
  • Chapter 14: Managing memory (almost) automatically
  • Chapter 15: Revisiting character pictures
  • Chapter 16: Where do we go from here?