Shop now Shop now Shop now  Up to 50% Off Fashion  Shop all Amazon Fashion Cloud Drive Photos Shop now Learn More Shop now Shop now Shop Fire Shop Kindle Learn more Shop now Shop now

Customer Reviews

3.8 out of 5 stars109
3.8 out of 5 stars
Your rating(Clear)Rate this item


There was a problem filtering reviews right now. Please try again later.

on 14 August 2007
This book claims that the code is ANSI compliant and so should work with a modern C++ compiler. As far as I can see this is not so. The only reference that I can see is the standard namespace which is mentioned in day 1. There is no use of the standard String class - even at a basic level. Instead in day 13, together with arrays and linked list you will see the old fashioned C-strings being used together with the authors version of a String class. Interestingly enough within the program that includes the author's string class there is a #include <string.h> instead of #include <cstring> indicating that the author has mixed old C++ header files with those currently available in the ANSI/OSI standard. This I find very confusing, and would indeed be doubly so for a total beginner.
There are also no mention of many important topics included in the ANSI/OSI standard. I would have thought that the vector class would have fitted in well with the chapter on arrays and linked lists. The linked lists could have been left till later.

The earlier chapters are relatively easy to follow and could easily be completed in 1 day. The main problem is that the order of presentation does not make much sense. The beginner is not guided from one concept to another. Many of the explanations are rather longwinded and there is a lot of waffle that should be skipped.

The book is useful in places, but does not form a coherent text book for a beginner C++ programmer, which I understand is the target audience.
0Comment|6 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 15 November 2013
By the time of typing this (November 2013), it is obviously somewhat late for me to contribute a 'review' of this book, as the world of computing has moved on, but as it is the most disgraceful instance that I have ever encountered (in any subject field) of inadequate proof-reading, I would like belatedly to share my opinion on it with any Amazon customer who is considering buying a copy.

In 2000 I bought the following two books from SAMS publications: the book under discussion here (Teach Yourself C in 21 Days, by Peter Aitken & Bradley L. Jones, Fifth Edition, 2000, First Printing, October 1999) and Teach Yourself C++ in 21 Days, by Jesse Liberty, Third Edition, 1999, First Printing, February 1999. As regards the style and content of both books, there is a great deal to praise. My impression is that the three authors are not only skilled programmers but also experienced teachers.

Before buying these books I had already read another course about C programming, but had been confused by it. However, after reading the book by Mr Aitken & Mr Jones, I realised that the course which I had previously read had merely been explained badly, with the various concepts of C programming being introduced in the wrong order and without sufficient detail. Reading the Aitken/Jones book made the C language appear relatively simple as the authors offer a coherent and ideal introduction to the subject. One of the strongest aspects of Mr Liberty's book is that when introducing new concepts, he uses the same examples for much of the time (I refer to the "Animal" & "Cat" classes), extending them to include the new ideas which are being introduced: this is a good idea, because the reader becomes familiar with the same classes and is able to compare the similarities between the various listings, as well as the contrasts between them, to study how the listings develop in complexity. It is also clear that Mr Liberty has, despite his experience, not forgotten the difficulties which novices initially have with C++ concepts, and I welcomed the amount of detail and explanation given - a level of detail which most students need, but which they might be embarrassed to ask a teacher.

So, full marks to the authors. But the rest of this review is somewhat more critical, as it appears that something went drastically wrong in the production of both books after they were written: I am referring to the astonishing number of mistakes. I have detailed some of the worst types of mistakes below. Interestingly, an earlier version of the Aitken/Jones book contains virtually none of the mistakes that are present in the Fifth Edition. I have seen neither of the earlier editions of Mr Liberty's book, but perhaps the same would be true of his book too.

Some of the mistakes are so obvious that one wonders whether the SAMS proofreaders even attempted to check the text before publication. For example, on page 351 of Mr Liberty's book there is a diagram to illustrate the two-dimensional array "Board[8][8]", which is analogous to a chess board. The chess board is illustrated correctly with 64 squares, but the array which is shown has 81 elements, which would actually represent an array such as "Board[9][9]". Moreover, on page 117 of the Aitken/Jones book, figure 5.6 reproduces the wrong diagram - the one which has already been printed on page 112 in its correct context.

Why did the proofreaders not identify mistakes which occur repeatedly? The most inexplicable example of this can be seen in Mr Liberty's book on page 270, where on line 4 of listing 10.1 the word "intint" appears. One needs only an elementary knowledge of programming to realise that this is a mistake. Turn the page and one sees that on page 272, line 4 of listing 10.2 has a similar mistake, with "int" written on its own. This mistake of writing "int" for no reason at the start of a program listing also occurs on pages 282, 283, 284, 286, 287, 289, 291, 293, 294, 300 & 301 in this chapter alone! Although the above list is confined to instances of the error in Chapter 10, the problem also appears elsewhere, such as line 5 of listing 9.8 on page 248. Similarly, line 2 of the "Week 1 In Review" program on page 193 contains the absurd line "intintboolfalsetrue" which should also have been spotted.

Even if the proofreaders did not understand program code, they ought at least to have identified mistakes in the English text. There are many grammatical errors (such as omitted words) in the explanations and commentaries. This is a matter of basic literacy, such as one has the right to expect in any publication. In Mr Liberty's book, there are quiz questions at the end of Day 11 (page 339) but when one looks up the answers (page 807) one finds that the answers which are given to the Day 11 questions actually refer to the questions after Day 12. Similarly, there are quiz questions at the end of Day 12 (page 382), but the answers which are given (page 808) actually refer to the questions after Day 11.

Worse, often the questions and answers do not match at all. To take an example, there are three quiz questions on page 628 following Day 18, but when one looks up the answers on page 827, one finds six answers. Answer 1 corresponds to question 1, but the remaining five answers consist of responses to questions which were not asked on page 628, therefore questions 2 & 3 from page 628 receive no answers. This is merely one example of confusion in the question/answer sections, but there are other similar instances, not only in Mr Liberty's book, but also in the Aitken/Jones book. In general, the questions are themselves reprinted in the section devoted to the answers, and in some instances the wording is different - usually only slightly, but in other cases significantly. It would surely not have been too much to ask the proofreaders to check for consistency here.

In Mr Liberty's book, the line numbers of the program listings sometimes get mixed up with the coding itself. As an example, look at listing 5.10 on page 115: in the middle of line 9, the figure 10 is followed by a colon, although it is obviously a line number. Then, in the middle of line 15, the figure 17 is followed by a colon. Next, at the end of line 20, the figure 23 is followed by a colon. This problem is not confined to listing 5.10, as it recurs elsewhere in the book: look at line 75 of listing 20.5 at the botton of page 699, where the figure 76 followed by a colon appears inexplicably as part of a class declaration, as "class xNegative : public xsize76:". This is clearly a line number which has gone astray, because when one turns the page one finds that line 76 is missing and the next line is line 77.

I am baffled as to why parentheses are omitted so often, along with the variables and constants which they are supposed to contain. Look at page 322 of the Aitken/Jones book, where on line 10 of listing 13.8 the keyword "while" is used in isolation, whereas what was supposed to be printed was "while(1)". An identical error recurs on line 11 of listing 13.9 on page 326, and this listing is particularly inaccurate, as line 21 simply says "exit;" when presumably "exit(0)" was intended.

The example just given, missing out both the parentheses and the integer argument when using the exit function, turns out to be one of the most frequent errors in the Aitken/Jones book. To take an example, on Day 16 it happens constantly (on pages 441 & 443, four times on page 448, twice on page 452, again on page 453, three times on page 455, then again on pages 456 & 458) and in this chapter in the book we also get more examples of the keyword "while" being used without the essential parentheses and a condition (line 10 on page 437 and line 48 on page 455).

Sometimes the missing text can be confusing to the novice programmer, for example lines 12 & 16 of listing 5.2 on page 105, where what is printed is "z = half_of" which is a misprint for "z = half_of(x)" and "z = half_of(y)". Likewise, on line 20 of listing 5.5 on page 115, "f = factorial" is printed, which should clearly be "f = factorial(x)" for it to have any meaning in C.

These omissions continue throughout the book. Look at page 588, where eight lines from the top of the page "#define SQUARE *" is printed. Presumably this should read "#define SQUARE(x)*(x)", judging by the context of what is being explained. Then, on page 596, the shaded "DO/DON'T" box says "#define CUBE **" when surely it should say "#define CUBE (x)*(x)*(x)". Again, this may appear so obvious to a professional programmer that it hardly needs commenting upon, but a novice reading the book may be bewildered.

Some of the mistakes are more difficult for a novice to spot, for example, line 13 of listing 14.5 on page 340, where the line "while ((ch = getch != `\r' && x < MAX)" has a closing parenthesis missing after "getch". This mistake also occurs twice on page 337 (line 9 of listing 14.2 and line 12 of listing 14.3) and on page 339 (line 10 of listing 14.4), to name only two examples of many. The programs will not function correctly without these parentheses, and errors of this nature seriously call into question the claim made in the acknowledgements section of the book that "the text and programs in this book have been thoroughly edited and tested".

My guess is that many of the listings in this book were considered so elementary that they were written without being entered or compiled. Damning evidence for this comes on pages 322-323: compare the literal strings on lines 25 & 34 of listing 13.8 with the output printed at the top of page 323, and one sees that the phraseology is different, illustrating that this is not genuine output from the "tested" program, but merely the output which was expected. Incidentally, line 10 of this listing is also wrong, with no argument in parentheses after the "while" keyword. Many beginners will have been confused by this chapter: the section on infinite loops (page 312) begins with an example with the same omission and has a similar omission in the example at the top of page 313.

I believe that some of the programs have bugs. In the Aitken/Jones book, listing 15.11 on pages 408-409 produces the correct output but is nevertheless illogical in its design. On line 32, the user is invited to enter '1' if he wishes an alphabetical sort. However, if he enters '1', on line 69 the conditional test will evaluate as TRUE, which means that the "reverse" function will be called. At this point, the program is therefore apparently going to do exactly the opposite processing to that which the user wants! However, when one examines the reverse function coding on lines 99 - 103, one notes that it will return a positive value if the first of the two arguments passed to it is greater (in other words, if the two lines are not in alphabetical order) and this will result in a TRUE evaluation on line 75, so that an exchange will take place on lines 77 - 79. So the reverse function will put the lines in alphabetical order! Similarly, the alphabetical function puts the lines in reverse alphabetical order. So what happens is that the opposite function is called to the one which the user wants, and then whichever function is called performs the opposite processing to what it is supposed to do anyway, thus the two mistakes cancel out and ironically the program gives the impression of working perfectly!

Sometimes, the text becomes confused. For example, on page 249 of Mr Liberty's book, there is an analysis of listing 9.8. This begins by stating that "on line 10, number, squared and cubed are defined as USHORTs". Actually, they are defined simply as ints, and although I realise that in other listings USHORT is a typedef for int, this typedef is not used in listing 9.8. What appears to have happened is that there was confusion between listing 9.8 and listing 9.9 on the next page, which does indeed use the typedef USHORT. In the next paragraph, it says "it sets return Value to a simple error value", which is misleading as there is no such variable as "return Value". I realise that what is meant is "it sets Value to a simple error value and returns Value". However, the next sentence is completely wrong, as it refers to "the return value from Function( )". However, there is no such function as "Function( )" and it is "Factor ( )" which is being refered to. Later in the analysis, it says "on line 38, return Value is assigned a success value". Since "return Value" is printed in monospace font, which is used throughout the book for actual C code, this is an unambiguous suggestion that "return Value" is actually a variable, but there is no such variable, only a variable called "Value" which is returned. Immediately afterwards, it is stated that "on line 39, return Value is returned", and again, "return Value" is in monospace, implying that it is a variable. It isn't. Moreover, it is not returned on line 39 anyway, it is returned on line 40. Getting the line numbers wrong during the analysis of listings is a frequent mistake in SAMS publications, and suggests that the analyses were based on initial drafts of the programs, which were then subsequently changed without updating the analysis. It is inevitable that there will always be small oversights of this sort by any author, but it is absurd that so many mistakes have been passed by the proofreaders.

If the mistakes which I have pointed out were the only errors in the two SAMS books which I have bought, it would hardly be worth writing about them. However, the truth is that these errors are merely representative of many other similar errors, far too numerous to list here. In essence, Peter Aitken, Bradley Jones and Jesse Liberty have produced excellent books, and it is very unfortunate that these books, which have the potential to be regarded as the best teaching manuals on the market, have been spoilt by the staggering degree of incompetence of the proofreaders at SAMS publishing. The two proofreaders responsible are named in the list of credits. As even the most obvious errors have been left uncorrected, it seems obvious that neither of them made even the slightest effort to check any part of the text before publication.
0Comment|One person found this helpful. Was this review helpful to you?YesNoReport abuse
on 13 April 2002
I have loads of books on C++. I am a skilled C programmer but could never get the gist of C++ and Object Oriented programming until I studied this book. Yes STUDIED. There are exercises for you to complete at the end of each chapter. DO THEM. You definitely will not do it in 21 days. The author (in another book) admits these are 'virtual days' needing 8-10 hours of study for each chapter. If this seems alot don't bother with C++ try Visual basic, C++ is not easy.
This must be the best book I have on C++, it doesn't quickly skim the subject but analyses the concepts and has detailed explanations of the code examples with DO's and DON'Ts. If you complete this book go onto
Scott Meyers Effective C++ books then you'll be a C++ GURU. Oh... you'll also need to study books on windows programming, see Jeff Prosise's book Programming windows with MFC. Thank you Jesse for this great book.
0Comment|21 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 20 May 1999
I'm appalled at the errors and inconsistencies in the examples of the edition I am using. Maybe the latest edition has been cleaned up but I have no intention of wasting any more money on a book so poorly edited and proofread.
0Comment|2 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 13 October 2003
The book is well written, well structured, and explains the basics of C++ in a clear and easy to read fashion. There are far worse books out there.
However, it spends time on things that are irrelevant to the absolute beginner (eg arrays of pointers, a whole chapter on OO design) and spends no time at all teaching you about the classes provided by the C++ standard library, which have the potential to make things way easier for beginners. Also, both the examples and exercises provided focus very much on syntax rather than on use, and as such you gain very little clue as to how what you are being taught might be used in a real program.
I prefer "Accelerated C++", which I bought on the recommendation of the website of the Association of C and C++ Users, and was glad that I did. It covers more material and gives a better idea of how to program real-life programs that Liberty's book, despite the fact it is only half the length.
The only problem with this alternative is that there is no repetition or filler at all - in Liberty's book the cut out grey boxes and constant repetition of earlier points make it a far easier read, whilst if you skip a sentence in Accelerated C++ for being too hard to understand you'll probably understand the next sentence even less.
In short, if you're a total beginner who likes things to be repeated a lot to understand them, maybe Liberty's book is for you, but if you're willing to put up with a more intense, technical style of writing then you could gain a lot more by buying Accelerated C++ instead.
22 comments|14 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 27 January 2011
I decided to read this book because although I work in IT I have always been a novice programmer. This book has given me a good understanding of C++ and enhanced my understanding of software development in general. Each day stands on its own and the program works quite well and makes it easy to follow and schedule. I tried to dedicate 2 evenings a week to this work and found that each lesson took me about 3 hours including the practicals and exercises. It took me 3 months to get through the whole book.

I feel that this approach to learning C++ worked well for me and was preferable compared to going on a course as I could take breaks or stop when I lost interest. Some of the exercises were slightly wrong but I managed to correct them without much aggravation. Overall I would recommend this book to anyone prepared to put in the dedication as it is not easy to stick with at times. I would consider another Sams book for learning other languages.
0Comment|Was this review helpful to you?YesNoReport abuse
on 1 January 1999
Only reason I bought this book was that it came with a Borland C++ compiler. The book is somewhat easy to read but examples are not clearly explained and furthermore Jesse introduces new topics in the examples which aren't discussed further on. Don't waste the money!
0Comment|One person found this helpful. Was this review helpful to you?YesNoReport abuse
on 13 July 1999
I bought this book hoping to learn the basics of C++ in 21 days.So far it has been 3 months and it only takes me to look at it for any ambition for programming to totally evaporize from me.The book is ok till chapter 6 or 7 and if you are a beginner reading on will make you look stupid in your own eyes no matter how clever and intellegent you are.By the end of the book I promise you will look for a different programming language.Although the book doesn't say it ,it is DEFINATELLY NOT FOR BEGINNERS!If your son bugs you to buy him a book to learn how to programm and you want him to be something else- buy him C++ in 21 days I think you will be satisfied with the results,
11 comment|4 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 19 June 1999
I bought this book along with the Borland C++ complier in one package. As you do, I was dreaming that I could program C++ in 21 days... However, I think the author missed a zero or two after the number 21 (which actually is 210 days or 2100 days...)
this book led me into a world of confusing, I lost my confidence right after the first 100 pages. I decided... This C++ language is for the genius or super-intelligents only...
I dropped the goal of C++ programing for a year. Then one day, I went to the Amazon Website and saw comments about the book named "The Beginner's Guide to C++" of Oleg Yaroshenko (5 stars). I decided to buy it. This book brought me back my confidence. I agree with readers who gave this a 5 stars rating.
One more comment about the Borland's C++ complier which goes along with the "C++ in 2100 days" book. DON'T BUY IT, because you can get no manual, and no support at all from Sam's Publisher. I installed it in my computer. Unfortunately, every time I wrote a program which need to input a Float variable, the complier stopped with the error message that says "Square root of a negative number"... I contacted Sam's Pub. many times to be answered by their auto answering webpage. Now, my Borland's complier is still a crippled software.
I feel I need to write this review as a way to say thanks to those who wrote the reviews about "The Beginner's Guide to C++", which gave me back my confidence.
0Comment|2 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 16 March 1999
This has been just the book for me. I found Jesse Liberty's writing to be very clear and his presentation format well-thought-out. In this day when "authors" slap together 1000-page books in a few weeks, filling them with incoherent, redundant writing and bug-infested sample code just to meet some publisher's deadline, Jesse Liberty's book is a breath of fresh air.
I join those who are rather puzzled about some of the other user's comments. All I can say is that you have to expect a challenge. Learning C++ is a pretty daunting task, and anyone who is expecting it to be easy is in for a rude awakening. If you're used to VB, and are expecting that you'll be able to jump right in and "just wing it", referring to the text only when you need to learn some new tricks, you'll either have to slow down and change your approach or stick with VB.
I would highly recommend this book to anyone who wishes they could take a good, intensive one-semester college course in C++, but, for whatever reason, doesn't have the option to do so. If you read everything carefully and in sequence, concentrate hard, do all the exercises, and don't try to take any short-cuts, you should gain a solid understanding of not just the C++ language, but of the more general principles of Object Oriented Programming. I think that this is about as much as anyone has a right to expect from a $30.00 book.
To borrow one of Jesse's presentation constructs (which I liked a lot):
DO buy this book. DO read it thoroughly and carefully. DON'T skim through or try to use it as a quick-reference handbook--it is a course in book form, and should be used primarily as such.
--Erik
0Comment|5 people found this helpful. Was this review helpful to you?YesNoReport abuse

Sponsored Links

  (What is this?)