Advertisement
Membership
Login
ACCU Buttons
Search in Book Reviews
The ACCU passes on review copies of computer books to its members for them to review.
The result is a large, high quality collection of book reviews by programmers, for programmers.
Currently there are 1949 reviews in the database and more every month.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
Title:
Object-Oriented Software in ANSI C++Author:
Michael SmithISBN:
0 07 709504 9Publisher:
McGraw-HillPages:
474ppPrice:
£24.99Reviewer:
Yechiel M. KimchiSubject:
beginner's c++; object orientedAppeared in:
12-3The 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
#includeinstead 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<
- The smallest problem here is the fact that operator! had not even been introduced.
std::cin
is used all over the book. Nowhere could I find the directive usingnamespace std;
not even in the chapter dealing with namespaces.- The usage of
eof()
is not a bug here, only becausech
is of typechar
. I easily found a similar piece of code which was buggy (p. 402)int num; while(cin>>num, !cin.eof()) { // whatever }
- This causes an infinite loop if the input is not an integer.
- Why not
std::cin
? Because here,cin
is a local variable! - The type of
cin
isistrstream
, a type designated by the standard as depreciated.
More examples of errors can be found on my pagehttp://www.cs.technion.ac.il/users/yechiel/CS/BadBooksC+C++.html#OOSCPPsmith