Advertisement
Membership
Login
ACCU Buttons
Search in Book Reviews
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.
Determining that this book was not what it claims (This book describes
the ANSI C++ language in a succinct and concise form. A knowledge of C++
(stet) is not required in order to follow the explanations.) becomes
apparent with the second line of the Introduction:
#include iostream.h
This book has no redeeming feature to compensate for not being about ANSI C++ but about some pre-Standard version. But let me give you a small example of what I find wrong with this book (to a far greater extent than my concerns with the C book). On page 110 there is the following tip:
The compiler automatically creates a copy constructor, an assignment operator and a parameterless constructor if you do not implement these methods yourself.Let me brush over the erroneous use of 'implement' (should have been declare) and focus on the default constructor (to give it its correct name - were these books originally written in German and been poorly translated?). The rule for that is different, the compiler does not generate one if you have declared ANY constructor.
On the next page we find another tip:
All classes with pointer attributes should define a copy constructor and an assignment operator.Note that the author still cannot get the terminology right. This time he used 'define' where he should have used 'declare'. But worse, he is confusing pointers with ownership semantics. And forgets to mention the destructor. Indeed he seems to think that the 'big three' are the default constructor, the copy constructor and copy assignment. That is not what any experienced C++ writer refers to as the 'big three'. And finally on the next page we find:
If you implement the classPlayingCardas illustrated below you can be sure that no card in a card game will suddenly appear twice.
class PlayingCard {
public:
PlayingCard(color color,
type type);
...
private:
operator= (const PlayingCard&);
color aColor;
type aType;
};
I rest my case (for the novices reading this review, he has completely forgotten the copy constructor so the compiler will happily generate copies, it just will not allow you to assign the value of one card to another. There are also issues with his using the same name for a type and a parameter).
If you accidentally bought this book, please return it to the seller and ask for your money to be refunded. This is not a book about ANSI C++, and it is riddled with errors even if we allow for that. I think this is the worst book I have seen from Addison-Wesley for over five years.