REVIEW - C/C++ New Reference


Title:

C/C++ New Reference

Author:

Dirk Louis

ISBN:

0130904597

Publisher:

Prentice Hall ()

Pages:

701pp

Reviewer:

Francis Glassborow

Reviewed:

April 2001

Rating:

★☆☆☆☆


Another reference book, so again I will sample it. The copyright date is 2001, however it seems to be a translation from a German version with a copyright in 1999. Perhaps that explains why it lists an ISO/IEC number for the original C Standard and for amendment 1 but does not give one for C++ (though it does state that it has an ANSI standard - I wish the author had called that ISO/IEC). He also lists a defunct URL for the final C++ draft (I think it was actually defunct by 1999)

A quick glance at the section on the C Standard library reveals a complete listing of the Standard C header files for the original C + amendment 1, but not for the current C Standard. Following the listings, each function is correctly described (but not in as much detail as you would find in Plauger's The Standard C Library.) On the positive side this book covers the headers introduced by amendment 1; I hope Plauger is preparing to update his book to incorporate the new C Standard.

Next I checked on const and found that even for its use outside a class context I had to look in five places, and I was left feeling a sense that the descriptions were inadequate.

One of these const references led me to look a literals. Nothing there about string literals being arrays of const char in C++. What was there was true but it was incomplete.

A couple of pages on I came to '#define - symbolic constants'. Even though the author often issues warnings elsewhere, there is nothing here about the problems caused in C++ by the pre-processor's lack of sensitivity to scope. Worse we have examples such as '#define dozen 12' and '#define Name "C++ Compiler"'. Both are very likely to cause problems at some stage. Nothing here about the pre-defined macros (__LINE__ etc.) nor could I find coverage of those elsewhere. Even if they are covered, this book fails as a reference book, because they were not easy to locate. When, if ever, did ZERO become a macro in stddef.h?

Next I had a look at namespace. Here I could pin down exactly what had been worrying me about this book. The author covers using directives, and aliasing namespaces but nowhere could I find anything on the subject of using declarations. The latter should be far the most common usage of using. Explicit qualification is only described implicitly (as part of the comments on several lines of code.

And so it went on. The author does not generally get it wrong he just does not cover the ground. Everywhere I looked I found omissions, inadequate descriptions and out of date mechanisms (his example of operator= uses the now dated non-exception safe idiom, he uses an earlier, pre-standard, auto_ptr, with a wrong declaration for its copy constructor, and assignment operator and no mention of its dangerous copy semantics)

I think I would have been unhappy with this book in 1999, I certainly cannot recommend it in 2001. The author needs to rip out the practice sections at the end to release space so that he can, with the help of good technical reviewers, complete the job this book claims to do. Actually, considering the size of the new version of C and that of C++, perhaps he should think in terms of two volumes.


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.