Your Garage Summer Reading Amazon Fashion Learn more Discover it Jessy Lanza Father's Day Gift Guide 2016 Fire TV Stick Luxury Beauty Father's Day Gifts Amazon Cash Back Offer DrThorne DrThorne DrThorne  Amazon Echo  Echo Dot  Amazon Tap  Echo Dot  Amazon Tap  Amazon Echo Starting at $49.99 All-New Kindle Oasis AutoRip in CDs & Vinyl Shop Now SnS

Your rating(Clear)Rate this item

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

on July 7, 2011
C++ Without Fear, 2nd Ed

In the interests of full disclosure, I was provided a free copy of this book for review purposes. I am an experienced C++ programmer, and responded to a request (in a professional forum) for reviewers.

As a quick overview - an excellent first book for a complete programming novice; probably a little slow-paced for someone who knows other languages. The style and approach are well structured for the intended audience and there are few errors in the example code. It will provide you with a good grounding in the basics of C++, and no more - but that's its stated goal. You need to follow on with books such as "Effective C++" by Scott Myers, "OOAD with Applications" by Grady Booch, and some more advanced C++ books. This book (sensibly) declares templates to be an "advanced" issue and beyond its scope, so you'll need to look elsewhere for that information.

It is important to note the author's intended audience - namely someone whose computing knowledge goes little farther than "how to turn on a computer and use a mouse" (xxiii). This needs to be born in mind if you actually do know your way around a programming language. The approach to presenting technical concepts, and the level of technical language used, is well tailored to beginners - but will drive an experienced programmer to quickly look for another book.

Overall, this is an excellent first book for the pure novice. I would advise a true newcomer to ensure they read everything, including (even especially) the "optional" parts. The Preface (which potential engineers will be inclined to skip on instinct, smacking too much of reading the instructions) contains important information about the structure of the book, and where to find some of the essential tools. Overland describes his sidebars as "interludes", or digressions, but there is much important information buried in them. The appendices are also required reading!

One nice aspect is that Overland never uses a language feature he has not introduced, and never introduces a feature he does not immediately use in an example. And, rare nowadays for a book so loaded with examples, nearly all of the presented code will compile and execute as expected. An unfortunate side effect of this approach, however, is the the person wanting to learn C++ ends up knowing a lot about the C string library (perhaps it is simpler to introduce than, say, <strstream> and strings oddly form a key component of most simple examples). Another example of using the 'C' approach in a C++ book is the use of the preprocessor for defining constants, when C++ has a perfectly good alternative with const - i.e. on page 225 you should use

const int SCR_LINES = 25;

rather than

#define SCR_LINES 25

Many language features come with "gotchas" if they are misused or abused, and Overland generally makes sure to introduce the warts when he provides a new feature. One area he missed is with the "sizeof()" operator. The reader is not told that taking the size of an array gives the total size, and not the number of elements. This is a common misconception, usually arising because the first time "sizeof()" is met is with char arrays. Just to clarify, the sizeof() operator provides the number of chars (usually bytes) needed to hold an instance of its parameter thus for the following:

int intArray[4];
char charArray[4];

sizeof(charArray) equals 4, but sizeof(intArray) equals "4 * sizeof(int)". To get the "length" of an array, you need "sizeof(intArray) / sizeof(intArray[0])".

I think that Chapter 8 (on files) would have been simpler to present if the string class has been introduced first. Also, the examples dealing with binary, read-write, files have an error and a trap for new programmers. When writing the data to the file, the size is given as "sizeof(name) -1" which fails to write out the 20th character of the "name" - this happens to be the NUL character terminating a full size string - which causes problems in later examples when the file is read back and printed out. Also, this example allows a file to be created with empty records and then these empty records to be read back in with no validation.

Importantly, Overland devotes an entire chapter to the whole concept of pointers. These are fundamental to programming in most modern languages, and often one of the hardest things to come to grips with for complete novices. The explanation is clear and concise, and most readers should be left with a reasonable understanding of them. However, I think references could have been introduced a lot earlier in function prototypes - which would have obviated the need to deal with them quite so early on in the book.

While templates are sensibly put off for more advanced books, only providing enough information to begin using the STL, the section on exceptions really needs more detail. While a novice programmer may not choose to use them in their own designs, almost any library they link to runs a high chance of being able to throw exceptions. Thus, the novice is gong to end up being intimately acquainted with exceptions whether they like it or not.

In case you're thinking I don't like this book, don't get me wrong. I'll repeat that I think it is an excellent starter for the complete novice. But if you're wondering whether or not to buy it, you really want to know it's problems as well as its strengths. So I'll wrap up with a list of my personal grievances - there is also an errata available on the web which I recommend you download and use to mark up the book. the following are not in the errata (yet).

- An exercise on page 203 suggests the following to check if a (c style) string contains "@@@": "if (strcmp(input_line, "@@@")) ...". This should read "if (strcmp(input_line,"@@@") == 0)" as a non-zero return means "not equal to".

- The binary read/write example on pages 212, 214, 215, and 216 needs to remove the "-1" from the sizeof for the name field.
- Exercise 11.1.1 on p 296 talks about the "\=" operator, when it should be the "/=" operator.
- The array initialization on p329 declares arr_of_fract[4] and then assigns 3 values, without explaining what happens to the 4th object.
- on p 371, the String class definition does not provide a type for the "ptr" member - should be "char *ptr;"

- Throughout the book, main() alternates between being defined as "void main()" and "int main()". Only the latter is correct. "Void main" harks back to the earliest K&R C language and has long been deprecated (or actually illegal) in C++.

- Virtual destructors are never explained, but their absence is a source of regular frustration in newbie's code.

- The book has a definite leaning towards the Windows world, with filenames containing "C:" for example.

- Many examples end with a call to "system("PAUSE");" to prevent the output console disappearing. They do not, however, include any headers to define "system()", and the "PAUSE" command is unique to Windows platforms. This was a source of frustration for my son when he tried to get his first example working.

- The compilers recommended in the preface are obsolete. There are much better free alternatives available today (for example: CODE::BLOCKS, Eclipse, Netbeans/C++) and this section needs to be updated.

- The biggest technical error I found in the book was on page 235, where Overland states that "variables are assumed to be private to the module in which they are created - unless and extern declaration is added". This is, in fact, completely the opposite of reality. In C and C++, the default linkage of a file-scope variable is GLOBAL, and the extern keyword just says "this is declared in another file".

These gripes aside (and there are always problems in technical texts!) it's a very good book, and I happily recommend it.

Keith Derrick
0Comment|51 people found this helpful. Was this review helpful to you?YesNoReport abuse
on June 27, 2011
Books attempting to teach beginners both programming and C++ are, of course, relatively rare. In the preface to this one the author says "What's different about this book is that I'm an advocate for you, the reader. I'm on your side. ...". And indeed the enthusiasm of the approach will probably be a great encouragement to the target audience. A persistent reader who worked their way through the book could learn a lot about programming and C++. There is a lot of good factual material and there are a number of clear and illuminating examples.

If the this reader read the book in its entirety they could, however, pick up a lot of misleading information, and miss out on some important fundamentals of programming, and of C++. For example, under the heading "What is not covered", the answer message starts "Relatively little as it turns out.". Yet, for example, the only container described in any detail in the chapter on the STL is std::list, plus the container adaptor std::stack. Iterators are briefly covered, but not the (STL) algorithms. The appendix "STL Classes and Objects" gives a nod to the wider scope of the standard facilities in this area, but only covers std::string, std::list, and std::stack, as the templates used in the text - and it does this in less than six pages.

Some things that I like about the presentation are the use of graphic schematics, such as the flowchart in the first chapter; and the fact that C++0x has been given some coverage (in Chapter 10, and elsewhere). Also pointers seem to be quite well explained, with useful graphics. On the other hand a lot of the text is very much C rather than C++ oriented; and the illustration of code to implement the assignment operator for a user-defined String class repeats the classic problematic use of delete[] preceding new[]. (The issue of potential self-assignment is relevant here as well, but is not raised.) This is symptomatic of an approach that does not, for me, sufficiently reflect current C++ knowledge and practice. (Selected appropriately for the target audience, of course, showing them today's approaches and idioms.) Yet another symptom of this is that the appendix titled "Standard Library Functions" only covers some functions "imported" from C. Two other appendices cover I/O and STL (see above), but the majority of C++ standard libraries and library functions are not even mentioned.

The book's text and website usefully points to a C++ IDE (DevC++), and mentions VC++ - but there is no guidance provided for readers who want to use an OS other than MS Windows.

In summary then, this book could reasonable be expected to be useful for its intended readership. But I think that the emphasis and indeed content could be greatly improved.
11 comment|16 people found this helpful. Was this review helpful to you?YesNoReport abuse
on January 27, 2013
First: a very good primer on C++. I've learned much from it. Advanced topics are stated to be such, and are handled only after the necessary basics are introduced. The really nice thing is that it does NOT require a thorough understanding of the c language to understand and learn from the book.

The book includes instructions for using with two different IDEs (Integrated Development Environments). The problem is, these seem to be aimed at the Windows market. For LInux users, these instructions are not so helpful. I have been using the KDE development system, and there are some differences in coding when using this. The "using namespace" macro doesn't seem to have any effect. I'm actually having to include the std:: (or whatever) prefix to each operator aside from the usual math and assignment operators.
0Comment|3 people found this helpful. Was this review helpful to you?YesNoReport abuse
on September 7, 2011
In my opinion, writing a beginner C++ book is impossible. C++ is too huge to be explained in general, and the sheer volume of details one needs to know even to write a "hello world" is enough to make one stop before even starting. Who is a "beginner", anyway? Someone with only the basic knowledge of computers, as author suggests? I don't think it's a good idea to start them on a very complicated language like C++. Someone who knows another computer language is better taught using similarities and differences between his language and C++. Someone who does not know other languages might be better off learning a specific framework first, and then looking at the wide world of C++.

That said, the book is a pretty good attempt at tackling this impossible task. Author tries to strike the delicate balance between explaining every detail (which are plenty in the simplest of examples) and trying to make the program do something interesting.

My main complaint is mixing C and object-oriented C++ approaches. Trying to use a little bit of both, in my experience, leads to enormous confusion. One can use char arrays, strcpy(), printf() and company, or std::string and streams to accomplish the same task. Learning both at the same time is hard. The book does not avoid this problem.
0Comment|5 people found this helpful. Was this review helpful to you?YesNoReport abuse
on December 12, 2011
This book is written in a way that is far from boring. I remember years ago when I picked up a book that weighed pounds and was very hard to read. This book is completely different, for the better. The author explains things in a way that is common sense. For the experienced programmer, you will probably find yourself skipping parts, especially the first few chapters.
0Comment|3 people found this helpful. Was this review helpful to you?YesNoReport abuse
on March 31, 2013
I'm about halfway through this book and have learned a lot, and I think I'd recommend this to others with one warning: there's some unfortunate typos/mistakes, including one in the example code so far. Other than that, I really like how easy the author made it to go into each topic quickly or in-depth, depending on your style.

I have the Kindle version, and on my Kindle Keyboard it's much easier to follow along with the orientation set to sideways; otherwise, the example code get chopped up and isn't very readable. On the Kindle iPad app everything is displayed just fine.
0Comment|2 people found this helpful. Was this review helpful to you?YesNoReport abuse
on June 28, 2011
In this volume, the author sets out to teach C++ to non-programmers, which means he must teach programming as well as the c++ language. This is quite a daunting task, and one he falls short of achieving.
The parts teaching programming seemed hampered by using a language like c++, especially when it is used primarily as C with some extensions. While some of the examples are interesting, and the historical facts very much so (the towers of hanoi examples are quite fun), there are far too many examples of programs that do things the C++ libraries already do better.
When it comes to learning C++, the author dives into some of the badly used, and unnecessary for beginners, sections like operator overloading. There are also references to new C++0x extensions that are far too advanced for the target audience.
This is not a bad book, and by the end of it a reader should have a reasonable grasp on programming fundamentals, and the basics of C++. Unfortunately they will also have a poor understanding of C++ as an OO language, and will have learned a number of really bad habits (like unnecessary optimizations and over use of in-lining).
0Comment|6 people found this helpful. Was this review helpful to you?YesNoReport abuse
on December 22, 2011
For anyone looking to purchase one book to learn C++, this is one that certainly deserves consideration. The author makes use of his extensive programming experience to not only explain step by step how to write C++ programs, he also covers how useful each pirce is and what approaches are likely to cause trouble. What this means is that the reader can focus their attention on those parts of the language that are actually useful rather than wasting lots of time on parts of the language that are only rarely used.

The book starts of with explaining the basics of how programming languages work in chapter one and by the last chapter is explaining relatively advanced aspects of programming. This approach makes the book more useful over a longer period as long as the reader doesn't try to learn everything too quickly and therefore not follow the material properly through not having learnt the earlier material properly before moving on. The appendices provide a significant reference to C++ programming.

The high standard of the C++ material in this book is further emphasised in that the only flaws I could find in the book are all relatively minor and none are directly related to C++ itself.
0Comment|3 people found this helpful. Was this review helpful to you?YesNoReport abuse
on February 3, 2012
This book does a great job of explaining the concepts of C++ in a simple and easy to understand way. I was worried that C++ would be too hard for me since I only have experience in Visual Basic, but so far this book has me feeling confident that I can actually learn the language. I'm not even half way done, and on forums I can already start to look at other people's code and understand what is going on. I am not done with the book yet so I'f my opinion changes I'll come and update the review, but so far I'm really liking this book and I'm really glad I purchased it.
0Comment|3 people found this helpful. Was this review helpful to you?YesNoReport abuse
on December 17, 2012
Please keep in mind that this is a beginner's guide. It's meant to introduce you to the foundations of C++ programming and it does so very well. Usually distillations such as this are very intense and frustrating, but this book is understandable, straight-forward and succinct. I highly recommend it.
0Comment|3 people found this helpful. Was this review helpful to you?YesNoReport abuse

Send us feedback

How can we make Amazon Customer Reviews better for you?
Let us know here.