REVIEW - Problem Solving in C++ - Including Breadth and Laboratories


Title:

Problem Solving in C++

Including Breadth and Laboratories

Author:

Angela B. Shiflet, Paul A. Nagin, John S. Hinkel

ISBN:

Publisher:

Course Technology Ptr (2004)

Pages:

1069pp

Reviewer:

Frank Antonsen

Reviewed:

February 2005

Rating:

★☆☆☆☆


I have some problems with this book. On the one hand, it is written in an easy to follow language and contains valid points on how to structure programs. It also contains some interesting background information and exercises.

However, the book is more about C with I/O streams added than it is about C++. Even though classes are introduced early on (in chapter 3, on page 151), they are rarely used for anything but the most trivial encapsulation. I would be able to accept this in a beginner's book if there were not so many such oddities and omissions.

Let me give some examples.

For the first 10 chapters, spanning two thirds of the book, the only character data type introduced is char. Then in chapter 11, the first 40-odd pages are used to discuss char*, before 8 pages are devoted to the standard string class. Why? The fundamental character data type is after all not the individual character, just like the basic numeric data type is not the digit. Ironically, the authors finish chapter 11 with saying that people should use std::string instead of the old C-strings!

Throughout the book the authors prefer to use the C-functions exit or even assert to terminate a program upon error. Why do they not use exceptions?

Chapter 10 introduces arrays, and finishes off by introducing the vector class from STL. They even give a (very short) introduction to templates, which they then never use. The final chapters of the book implement some basic data structures. This would be perfectly acceptable if it was a way of demonstrating how templates are used in STL by providing some simple implementation of the container. Instead they even fail to mention that the STL contains (far superior) implementations of these containers.

Furthermore, this is a book that goes to great lengths to teach safe programming methods. Why do they then almost invariably define global constants with #define instead of using const int


or  string

etc, which would give them type safety as well?

In summary, the authors seem to possess only a rudimentary knowledge of modern C++. As I said above, this is really a book on C with C++'s iostream library added. Not recommended.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.