Practical C++ Programming, Second Edition
By Steve Oualline
Second Edition
December 2002
Pages: 574
ISBN 10: 0-596-00419-2 |
ISBN 13: 9780596004194




(Average of 10 Customer Reviews)


Book description
In short, to-the-point chapters, Practical C++ Programming covers all aspects of programming including style, software engineering, programming design, object-oriented design, and debugging. It also covers common mistakes and how to find (and avoid) them. End of chapter exercises help you ensure you've mastered the material. Steve Oualline's clear, easy-going writing style and hands-on approach to learning make Practical C++ Programming a nearly painless way to master this complex but powerful programming language.
Full Description
C++ is a powerful, highly flexible, and adaptable programming language that allows software engineers to organize and process information quickly and effectively. But this high-level language is relatively difficult to master, even if you already know the C programming language.
The 2nd edition of
Practical C++ Programming is a complete introduction to the C++ language for programmers who are learning C++. Reflecting the latest changes to the C++ standard, this 2nd edition takes a useful down-to-earth approach, placing a strong emphasis on how to design clean, elegant code.
In short, to-the-point chapters, all aspects of programming are covered including style, software engineering, programming design, object-oriented design, and debugging. It also covers common mistakes and how to find (and avoid) them. End of chapter exercises help you ensure you've mastered the material.
Practical C++ Programming thoroughly covers:
- C++ Syntax
- Coding standards and style
- Creation and use of object classes
- Templates
- Debugging and optimization
- Use of the C++ preprocessor
- File input/output
Steve Oualline's clear, easy-going writing style and hands-on approach to learning make
Practical C++ Programming a nearly painless way to master this complex but powerful programming language.
Browse within this book
Cover
| Table of Contents
| Colophon
Featured customer reviews

Why I hate this book,
June 09 2007
Submitted by
IP Freely
[
Respond |
View]
I didn't start off hating Oualline's Practical C++ Programming (PCPP), but grew more and more frustrated trying unsuccessfully to learn from it. Eventually I bought Stroustrup (not easy reading, but thorough and reliable), then came back years later and realized how incompetently-written PCPP is. Detailed, well-argued reviews panning PCPP have been available online for more than six years. I'm only investing time to write this review because I see, with some shock, that in 2007 one can still find positive reviews. PCPP is a black mark on an otherwise excellent series of books. If discontinuing the volume isn't possible, the title should be changed to the more accurate ``C++ syntax for C programmers'' and the back cover comments, some of which are baldly false (``...a complete introduction to the C++ language for the beginning programmer...''), should be rewritten.
PCPP garners opinions at both ends of the spectrum, and few in between. In fairness, there's truth in the positive reviews: Parts are written in a lively style, and the book might be useful to a C programmer who needs to port code quickly to C++ syntax. If you consult the book as a guide to quick-and-dirty porting of C to C++, or as a first introduction to the process of programming (and you read only Chapters 1-3 and 7), you may have an acceptable experience. If you intend to learn C++, not merely the syntax, but the overall philosophy, I'd recommend books by Scott Meyers, Stephen Dewhurst, Herb Sutter, or Bjarne Stroustrup. Oualline's PCPP is a terrible C++ book, introductory or no.
As others have mentioned, PCPP is filled with typos. According to Oualline, this is a feature, not a bug, since a programmer must be able to spot errors in code. Unfortunately for the C++ newbie, this reasoning presumes one already knows the language.
The book exhibits (and therefore disseminates) numerous, fundamental misunderstandings of C++ features, design, and programming philosophy. Why even mention macros and the pre-processor, structures, unions, and bitfields in a C++ book that neglects data encapsulation, object-oriented design, memory management idioms, virtual functions and inheritance, templates, and other basic language features and philosophy? These are not merely consequences of the publication date.
Flipping casually through my own well-marked copy of PCPP, without searching for particularly egregious lapses of accuracy and clarity, I found dozens of gaffes. Chapter 5 discusses arrays, while the STL provides less error-prone methods of handling strings and a variety of list-like structures. And telling the reader to use fixed-size arrays, strcpy, et. al?! Hard-coding container sizes is not merely gratuitous rigidification; it's an invitation to buffer overflows and other memory-corrupting bugs.
The mis-explanations of references (combined with ampersand typos) are a pedagogical disaster. The first mention (p. 137) refers the reader to Chapter 4, where references do not appear. Oualline promptly claims, ``For global and local variables, reference variables are not very useful. However, when used as parameters they take on an entirely new meaning.'' For starters, good C++ uses const references to avoid unnecessary copying. Second, functions that modify their arguments are bad O-O style; the reference parameters should be private members of a class. Said class should provide a method the modifies the data. Open to a random page of PCPP and you're likely to encounter one or more errors of comparable magnitude.
It's difficult to understand how a competent C++ programmer could have written Chapter 13, which introduces classes. On p. 198: ``You start a stack design by designing the data structure.'' No, in an O-O language you start by designing an interface.
It gets worse. On p. 201: ``The design [of a stack] states that only the stack should have access to these fields, but there is nothing to prevent rogue code from modifying them.'' (Emphasis added.) Oualline's seemingly flip use of the term ``rogue code'' suggests malware. In reality, a class's internal data should be private to break unnecessary ties between distant parts of a program. One of C++'s great strengths is the compiler-enforced separation of interface and implementation. Oualline's failure to mention this basic features tells me he doesn't understand C++ at a level higher than basic grammar.
PCPP pretends to be a complete introduction to C++, but in fact emphasizes C's features, discusses only procedural programming, and fails to explain object-oriented programming (classes and inheritance) accurately or even to mention generic programming (templates). Oualline is a C programmer who believes he knows C++ because he can write C using C++ syntax. A reader whose sole exposure to C++ is Oualline's book has no meaningful knowledge of the vast differences between C and C++.
Very excellent technical presentation. Covers it all nicely,
March 25 2007
Submitted by
max11
[
Respond |
View]
Bought this title as a way to refresh c++ experience obtained during the 90's. Did the job. As well as providing lots of other insights. Lots of code examples. Excellent content on const, references, classes, bitwise, etc et al, extremely well done on everything c++. Would like to see his solutions to his exercises. Is that in the teacher guide? I don't really understand the critical reviews. This book is highly recommended.
Well done,
May 13 2006
Submitted by Anonymous Reader [
Respond |
View]
I've had a class in c++ and learned very little due to a bad teacher and even tried c++ for dummies but found it to be lacking and didn't bother to keep the book. This book however is very useful and well written. I recommend it.
Read all reviews
Practical C++ Programming,
September 09 2004
Submitted by Anonymous Reader [
Respond |
View]
One of the worst programming book's I ever have had the unfortune to read.
It allways start out explaining (in detail) how not to do, then it conitinue to make improvmens of the faulty code untill it works, unfortunatly the last tidbits of information are always given out of context, so you never get a working example.
This is really bad writing, stay away!
excellent,
August 04 2004
Submitted by
andysuwei
[
Respond |
View]
Very Good!
why people would want to trash this book here.
because this book is very successful in writing style. as Chinese Saying said:"The wind will destroy it if the tree is very beautiful in forest"
Practical C++ Programming, 2nd Edition Review,
March 20 2004
Submitted by a
[
Respond |
View]
a
Practical C++ Programming, 2nd Edition Review,
December 07 2003
Submitted by Barnaby Robson
[
Respond |
View]
Good Book
I have no idea why people would want to trash this book here. It explains everything and is a good read, if you can believe a programming book could be fun to read.
An example of what I mean is that as the text goes from simple to complex .. things are introduced ... their simplicity makes you say ".. but what would happen if x ..." and then the next chapter will have a section expounding on the last one including that complexity that you thought you were missing.
It
is a beginners book so some who are advanced might feel they are being babied ... this isnt a full reference manual. But actually the text is quite ambitious in scope .. it explains a great deal of programming related stuff with succinct one liners in the first chapters.
Also it is a little outdated. In one of the chapters he writes " .. more and more computers have graphics now" ... whoa that is sooo early ninetees.
The only thing missing is some answers to the exercises for a reader who isn't working through it with a class or teacher.
THE END.
Practical C++ Programming, 2nd Edition Review,
July 07 2003
Submitted by Harry J. Miktarian
[
Respond |
View]
This book has a bad rap in my opinion. If used in conjunction with a more complete reference or text on C++ it fills a nice niche. I appreciate the writing style and the "simplicity". It helped me get to speed quicker and actually programming faster. It does sound by the comments posted here and on Amazon that the first ed. contained a lot of flaws. I have the second edition and the flaws seemed minor (be sure to check out the errata). So to sum up, I think the book would be limiting if used as the sole text to learn C++. In conjunction with a more complete text on the matter it is quite good.
Practical C++ Programming, 2nd Edition Review,
March 15 2003
Submitted by Daniel
[
Respond |
View]
This book is a complete waste of time. Both for O'Reilly and a reader.
It's not possible to learn REAL C++ with books like this.
Examples and discussions are oversimplified.
Book full of typos and mistakes.
Don't trash your time and money - buy a Stroustrup and "Gang of four" book. There is NO other ways of learning C++ - "no silver bullet", no "21 days" hype.
I'm greatly disappointed with this release of O'Reilly.
Practical C++ Programming, 2nd Edition Review,
February 20 2003
Submitted by Neo
[
Respond |
View]
Very good book. But this edition is FULL of typographical errors!
Media reviews
"I found this book,
Practical C++ Programming, to be one of the finest technical books that I have ever had the pleasure of reading. While its intent is to teach you how to program, and it does a wonderful job of this, it makes it interesting, and more than that, fun. By providing critical thinking problems throughout, including practice coding assignments, it doesn't just show you how to code, it makes you understand."
-- Danny Bowman,
Edmonton Linux User Group
"'Practical C++ Programming' provides a thorough introduction to the basics of C++ including lots of pragmatic advice along the way. I would recommend this book to anyone with a working knowledge of any prior programming language (such as VB, Perl, or JavaScript) who wants to get started quickly on C++."
--Victor R. Volkman, "Windows::Developer Network," August 2003
Reviews From Previous Edition
"This book is perfect for beginning programmers and c programmers that are looking to move into C++. The book deals with real world problems and examples which makes everything a lot easier to understand and deal with. The book starts out nice and slow just teaching programming style, the c++ syntax, debugging, and always drives home the common programming mistakes...The book is great it has everything you need to learn C++ and then some, if you're a beginner it's a must have, even if you have some experience its still a must have."--Florian Hines, San Antonio Macromedia & ColdFusion UG, June 2002
Read all reviews