REVIEW - Object-Oriented Software in ANSI C++


Title:

Object-Oriented Software in ANSI C++

Author:

Michael A. Smith

ISBN:

Publisher:

McGraw-Hill College (1999)

Pages:

475pp

Reviewer:

Yechiel M. Kimchi

Reviewed:

June 2000

Rating:

★☆☆☆☆


The name of the game in this book is confusion. The title mentions ANSI-C++ and I have decided to believe the author's claim that he had compiled his examples with Borland C++ Builder. I shall leave open the question of why he was using

#include
instead of
or
.

Here are some additional confusing examples

  • Target readers. The back cover claims 'Assumes no previous knowledge of programming.' while the preface states 'This book is aimed at programmers who wish ...'
  • Teaching style and coding. The first chapter that introduces C++ has the following lines of code (p. 40)
    std::cin>>std::resetiosflags( std::ios::skipws );  while(std::cin>>ch, !std::cin.eof()){    std::cout<
  1. The smallest problem here is the fact that operator! had not even been introduced.
  2. std::cin
    is used all over the book. Nowhere could I find the directive using
    namespace std;
    not even in the chapter dealing with namespaces.
  3. The usage of
    eof()
    is not a bug here, only because
    ch
    is of type
    char
    . I easily found a similar piece of code which was buggy (p. 402)
    int num;  while(cin>>num, !cin.eof()) {      // whatever  }
    1. This causes an infinite loop if the input is not an integer.
    2. Why not
      std::cin
      ? Because here,
      cin
      is a local variable!
    3. The type of
      cin
      is
      istrstream
      , a type designated by the standard as depreciated.
Confused? So is the author of this book. However, while the author is able to write simple programs that will compile and may correctly run on some (definitely not all) input, the confused reader will hardly be able to acquire even this low-level skill. Not Recommended.

More examples of errors can be found on my pagehttp://www.cs.technion.ac.il/users/yechiel/CS/BadBooksC+C++.html#OOSCPPsmith


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.