Practical C++ Programming

By Steve Oualline
September 1995
Pages: 581
ISBN 10: 1-56592-139-9 | ISBN 13: 9781565921399
starstarstarstarstar (Average of 12 Customer Reviews)

This book has been updated—the edition you're requesting is OUT OF PRINT. Please visit the catalog page of the latest edition.

The latest edition is also available on Safari Books Online.

Description

A complete introduction to the C++ language for the beginning programmer and C programmers transitioning to C++. This book emphasizes a practical, real-world approach, including how to debug, how to make your code understandable to others, and how to understand other people's code. Covers good programming style, C++ syntax (what to use and what not to use), C++ class design, debugging and optimization, and common programming mistakes.
Full Description

Fast becoming the standard language of commercial software development, C++ is an update of the C programming language, adding object-oriented features that are very helpful for today's larger graphical applications. Practical C++ Programming is a complete introduction to the C++ language for the beginning programmer, and also for C programmers transitioning to C++. Unlike most other C++ books, this book emphasizes a practical, real-world approach, including how to debug, how to make your code understandable to others, and how to understand other people's code. Almost as important, this book is written in the readable style that has made Nutshell Handbooks(R) famous. Topics covered include:
  • Good programming style
  • C++ syntax, what to use and what not to use
  • C++ class design
  • Debugging and optimization
At the end of each chapter are a number of exercises you can use to make sure you've grasped the concepts. Solutions to most are provided. Practical C++ Programming describes standard C++ features that are supported by all UNIX C++ compilers (including gcc) and DOS/Windows and NT compilers (including Microsoft Visual C++). Comparison: Practical C++ Programming vs. C++: The Core Language O'Reilly's policy is not to publish two books on the same topic for the same audience. We'd rather spend twice the time on making one book the industry's best. So why do we have two C++ tutorials? Which one should you get? The answer is they're very different. Steve Oualline, author of the successful book Practical C Programming, came to us with the idea of doing a C++ edition. Thus was born Practical C++ Programming. It's a comprehensive tutorial to C++, starting from the ground up. It also covers the programming process, style, and other important real-world issues. By providing exercises and problems with answers, the book helps you make sure you understand before you move on. While that book was under development, we received the proposal for C++: The Core Language. Its innovative approach is to cover only a subset of the language -- the part that's most important to learn first -- and to assume readers already know C. The idea is that C++ is just too complicated to learn all at once. Instead, you learn the basics solidly from this short book, which prepares you to start programming and to understand some of the other C++ books you'll need for reference. These two books are based on different philosophies and are for different audiences. But there is one way in which they work together. If you are a C programmer, we recommend you start with C++: The Core Language, then read about advanced topics and real-world problems in Practical C++ Programming.



Featured customer reviews

Write a Review


Good book,  October 22 2006
Rating: StarStarStarStarStar
Submitted by majrair   [Respond | View]

I've found this book great. I have little experience in C, and this book is very readable. The translation (in italian) is not of the best i've read, however the book is very good.
Of course, you need another reference C++ book, but this one lets you to get to the end of a more 500 hundred pages smoothly, giving you clear ideas.
I think manuals should be like this one. Essentials and bring you to the aim.



Practical C++ Programming Review,  July 20 2002
Rating: StarStarStarStarStar
Submitted by mahdi saeed mohamed   [Respond | View]

c++ programming

computer network


Practical C++ Programming Review,  March 20 2002
Rating: StarStarStarStarStar
Submitted by BJL   [Respond | View]

This is a readable text. Its only problem is that it does not teach you the features of C++ that are the ones that make it different (and better) language than C. While classes and templates ate covered briefly, it does not even mention the fundamental classes for data structures from STL such as String, Vector, List, not to mention associative arrays or iterators. These are NOT advanced data structures, but rather the ones you are likely to use daily in proper C++ code. Anyone who uses only C-style strings and arrays in C++ either has a VERY good reason for doing so, or is (much more likely) totally ignorant of C++ content and purpose.

Therefore, if you want to learn C++ properly, do not even consider this book. Try e.g. "C++ primer" by Lippman and Lajoie - it teaches you real C++.

Read all reviews


Practical C++ Programming Review,  January 22 2002
Rating: StarStarStarStarStar
Submitted by Jeff Pierquet   [Respond | View]

this book is great. most of the people who complain about it not getting in-depth fast enough forget that this book teaches how to program in c++, not how to master it.

to clarify for earlier posters, the books on c and c++ are similar because they have the same purpose, and because the languages are very similar. why make up new examples when you have perfectly good ones available? for those people complaining about the transition from practical c to practical c++, there is a book readily available called c++: the core language that is especially catered to c to c++ transitions (so you don't have to suffer through the horrors and trauma of repeated examples - note the hint of sarcasm). most of the bad reviews i have seen are from people expecting unrealistic things from a book that was only meant to introduce the language to it's readers from the ground up.

i have recently finished reading it at age 16 coming in with a background in basic and have found it to be neither too easy nor too difficult to read. the author has successfully created a well-rounded book that caters to just about anyone who wants to learn c++. the approach to the language is very smart, logical, and well-paced. i would recommend this book immediately to anyone who wants to learn c++.

it has a cool picture of a chipmunk on the cover, as well, so buy it.


Practical C++ Programming Review,  January 15 2002
Rating: StarStarStarStarStar
Submitted by syed ahmed   [Respond | View]

this is book is by far the best purchased i made,

before this book i bought

three different books

1. how to c++ programming (deitel&deitel)

2. teach your self c++ (sams)

3. c++ interactive course .

and guess what i read them all but the techniques they use is rubbish context layout and explanation is not worth the price of money.

this was the first book i bought from oreilly and its the best choice i made so far no wonder oreilly books are the books used by most programmers and they should get most credit than any other publisher for providing the best clearly explained and full of information for the subject.

i must say english is not my first language but with this book al looked so easy as iam reading in my own language.

thanks

steve.

for writing such a great book!!!!!


Practical C++ Programming Review,  December 14 2001
Rating: StarStarStarStarStar
Submitted by Tanmay Chakrabarti.   [Respond | View]

Dear Steave,

Nodoubt it is one of the very good book. I have a copy of your book

on Practical c++ programming. But unfortunately it does not cover

the topic on the process of creation of the driver files

thanking you

Tanmay Chakrabarti.


Practical C++ Programming Review,  July 29 2001
Rating: StarStarStarStarStar
Submitted by Justin   [Respond | View]

I read the comments after buying the book and I'm very glad I bought it first. The comments might have disuaded me from doing so!! I'm not a "programmer" by trade, and I admit, perhaps it's not the best book for such professionals. I have however an interest in programming currently as a hobby, but find myself drifting more toward the computer field as time progresses. This is the third or fourth book on C/C++ I have started, and I can say with certainty, it is the only one whith which I feel I am REALLY learning the C language.

I especially appreciate the brevity. Other programming books I have are 2 to 3 times as large ... meaning they take 2 to 3 (or 4 or 5...) times as long to get anywere! The short to-the-point chapters both keep the reader's attention and yet do not overwhelm you. Theory is nice, but let me get in there and get my hands dirty, man!! The examples I liked ... although, I often found myself thinking that more advanced topics (which I knew of from previous programming experience) would make the program smoother and often save typing. Frequently those topics were found in the next chapter. I think that minor amount of frustration helped me learn more as I thought "OH!! THAT's how I could have done that exercise last chapter!"

I FEEL I HAVE LEARNED MORE IN LESS TIME WITH THIS BOOK THAN WITH ANY OTHER C OR C++ BOOK I HAVE STARTED READING.

I can't say this book will teach you C++ from ground zero, but with a modest background in programming I believe it should be more than sufficient. Will this book alone teach you all you need to know? No, of course not. Will you need other books? Yes, certainly. But is this book the best place I've yet found to start. ABSOLUTELY!!!


Practical C++ Programming Review,  May 31 2001
Rating: StarStarStarStarStar
Submitted by Hugues Talbot   [Respond | View]

Whatever you do, do not buy this book. Even though its style is

relatively clear, it does not teach post-ANSI/ISO standard C++.

As a result many of the chapters in this 1995 book are either

redundant, confusing or downright wrong.

None of the modern features of C++ such as modern templates, exception

handling, namespace and the fantastic standard C++ to name a few get

any mention at all.

It is appalling that O'Reilly offering on C++ basically consists of

this book and `C++, the core language'. The latter book makes a

reasonable attempt at teaching the more basic aspects of C++ to

C programmers, but this supposedly more advanced book is just not

on.

If you are seeking a short, clear, advanced and modern introduction

to C++, I recommend `The ANSI/ISO C++ Professional Programmer's

Handbook', by Danny Kalev, QUE, ISBN 0-7897-2022-1.




Practical C++ Programming Review,  May 09 2001
Rating: StarStarStarStarStar
Submitted by Dr. Gonzo   [Respond | View]

/*

<blockquote>

Great book.

I first read it when I was 17.

And today - I'm a 1st class techie, parts to this book.

Altough I'm not programming in C++ anymore (I switched to developing my own languages...man I tell ya, a daunting but rewarding task...but hey, let's move bak 2 te buk!: This book is enlightenment.

Steve - you did it...Sometimes, when I am home alone and don't know what to do, I grab the book, read a few pages in it. And I laugh, and smile, and hey, ...can't ell ya...

</blockquote>

*/

return true;




Practical C++ Programming Review,  January 14 2001
Rating: StarStarStarStarStar
Submitted by Steven Watson   [Respond | View]



OK book, but having previously read "Practical C"

by the same author I was in a continual state of deja vu because

many of the examples are the same between the two.

To me this is a very sad state meaning the author is either

a completely unimaginative, boring person or simply too lazy.

Either way, I feel the price I paid for the book was too high.


Practical C++ Programming Review,  November 17 2000
Rating: StarStarStarStarStar
Submitted by Jeffery Thomas   [Respond | View]

I enjoyed reading this book and I like Mr. Oualline style.

Unfortunately, the dialect of C++ (circa 1995) used in the book does

seem a bit dated. I would love to see an updated version, using the

ISO/ANSI standard C++.

Still, the book is a good read even if you already know C++. It

covers a good base of general topics in C++ and refreshed my memory

of all the nooks of the base language.




Practical C++ Programming Review,  September 13 2000
Rating: StarStarStarStarStar
Submitted by Terence Pope   [Respond | View]

I have no C++ experience at all. But this book is so easily written and flows very well. I will recommend this book to all of my freinds. It is above the dummies level and below the egghead level so us mere mortals can understand the subject. It also explains the subject in plain english that will entertain you. GREAT BOOK!!!!!! Mr Oualline


Practical C++ Programming Review,  January 11 2000
Submitted by Scott Beckman   [Respond | View]



Although I have numerous other ORA books and enjoy them thoroughly, I must say that this book was not at all helpful. I feel that the primary problem with the text is that it did not give a good explanation about how to program in C++. Yes it does explain how various features of the language work, but now how to implement them. The examples given were limited in scope and little explanation was given about how object oriented programming is really done.

I would recommend to anyone planning to learn how to write C++ code and how to work with objects to read Bruce Eckel’s "Thinking in C++" rather than this book. Mr. Eckel distributes his book for free at http://www.bruceeckel.com/ .



Practical C++ Programming Review,  January 01 2000
Submitted by John P. Withers   [Respond | View]



First, what this book isn't: a complete, semi-complete or even somewhat complete reference for the C++ language. This book will not give you the information to pull off anything really practical in the language.

However, what this book does do (or at least did for me) is give me a really good introduction to the language that made sense. I program in a number of languages, but never got C++ in spite of picking up a few books here and there. For some reason, this book jelled all my previous aborted efforts at learning C++ and with the addition of some harder-core references later, made me into a semi-competent C++ coder. For some reason Oualline's style stuck to my brain and let me move on to more advanced books, where other intro's didn't. Your milage may vary.


Practical C++ Programming Review,  November 23 1999
Submitted by Patrick   [Respond | View]



Boy, i wish i had seen the comments section before buying the book.

I read Bjarne Stroustrup's C++ language ref thinking that it was a suitable introduction/tutorial to the language, but was overwhelmed!

Now, i am just completely underwhelmed, knowing that there is little more content than "C with Classes."

After all the rave reviews of O'Reilly books, I am sorely disappointed.




Practical C++ Programming Review,  August 27 1999
Submitted by Stephen Allison   [Respond | View]



I found this book a bit of a dissappointment, certainly from a publisher as competent as O'Reilly. It does a fair job of teaching "C with classes", but objects take a back seat (they're barely mentioned before chapter 13) and if you're not going to do full blown object oriented programming why use C++?

Overall this book provides a poor introduction to C++, a prospective student would be better off with a text that stresses C++ issues from the outset.


Practical C++ Programming Review,  August 19 1999
Submitted by S.T.C.   [Respond | View]



I bought this book a few years ago when I was
feeling gung-ho about learning C++. I read some
chapters off and on, my favorite being Chapter
17: Debugging and Optimization. Now I am on
downtime, so I picked up the book and started
reading it again. This book and another C++
tutorial by Marshall Brain are the only ones I was
able to understand when it came to explaining the
purpose of classes. The length of the chapters were
long enough to hold my attention span. Not to mention
the flow. I would rather read something that reads
like a story than something formal and sterile.

On the flip side, I found some exercises to be
unclear and incomplete. In the real world you can
ask someone to get clarification about the specs.
Not so, here. One example was 12-1 where a list
of names and address were to be sorted and printed
as a set of mailing labels. Questions should fully
reinforce what the chapter was all about. Where the
author got the idea of sorting was left to be
desired. That has since changed in the errata and
newer editions.

I would still recommend this book to be used as
one of the ones to study from. This book alone
cannot make a C++ programmer. I think that the
overall goal of this book is to get started. Don't
worry if the entire language is not included. I am
halfway through the book. I already know that once
I finish it, I can pick up another C++ book of a
higher level of difficulty and be able to comprehend
it rather than read the book superficially.

Finally, it have be would nice if the author had
provided an e-mail address.


Practical C++ Programming Review,  June 08 1999
Submitted by Jonathon R.   [Respond | View]



Having been a perl programmer for a number of
years, and using it almost exclusively, I was
able to easily understand the basic concepts
presented.

The author's style, however, is what made this
book worthwhile. So far I am only 6 chapters into
the book, but already I know that my mind is
retaining more than it ever has reading other
programming books.

I'm not quite sure if this will make it to my
"handy nearby reference shelf" like the
Programming Perl series did, but it seems a very
good place to start with C++.


Practical C++ Programming Review,  May 25 1999
Submitted by JRH   [Respond | View]



I found it really hard to learn very much from this
book, because it doesn't really explain the hows
and whys of anything. If you are like me and need
to know why stuff works, then dont read this or
it will make you more confused. Maybe it is just
a bit too "practical", I thought it was more
"incomplete".


Practical C++ Programming Review,  May 10 1999
Submitted by Ryan Beasley   [Respond | View]



I must say that I absolutely loved this book and now I have to buy a copy for myself. (I borrowed it from a friend.) It's very resourceful and Oualline combines useful technical details with a friendly sense of writing, thus keeping the focus on *practical* C++ programming.

As far as previously mentioned typographical errors, I'd just like to point readers to the beloved preface which states

"Computer languages are best learned by writing and *debugging* programs. Sweating over a broken program at two o'clock in the morning only to find that you typed = where you should have typed == is a very effective teaching tool. Many programming examples are used throughout this book. Most of them contain deliberate errors. you are encouraged to enter the examples into 6your computer and the run and debug them This process introduces you to common errors using short programs so you will know how to spot and correct such errors in your own larger progams." (xvi, "Practical C++ Programming")

Thank you,
Ryan


Practical C++ Programming Review,  February 26 1999
Submitted by cg@concentric.net   [Respond | View]



I have to admit, some of the chapters (9 & 14) are absolute Hell to unravel and mentally re-organize, and there are a few chapters (like the one on the preprocessor) that are rife with identifiable typos, BUT I do LOVE this book the most out of all my C/C++ manuals. I was completely new to programming, and this book was the only one that did not put me to sleep because of it's personable style -- like talking to an enthusiastic programmer rather than a syntax robot. The book never lost my interest -- it's actually fun to read. I used Deitel & Deitel's extremely detailed "How to Program" book, and Jamsa's "Bible" as reference support texts when Oualline got a bit confusing. In comparison, reading Deitel for 10 minutes would provide greater clarity through depth but then would cause me to drift into snoozeland.

I recommend this book for beginning programmers like myself who like to talk to people over a beer more than read technical manuals in a spotless room. Some of the presentation is not nice and tidy, but the main concepts are very clear and directly presented.

As an added bonus, the binding is flexible so you can really bend it in two and read it on the train, but the fabric spine keeps it from falling apart. And its not heavy in a way that you want to avoid taking it along in your pocket and scribbling all over it! Portability is half the game! Nice work Oualline and O'Reilly!


Practical C++ Programming Review,  January 21 1999
Submitted by John Doh   [Respond | View]



Many people feel that this book is disappointing, I found it very informative, as do many of my other students of programming that I know. It does not teach you how to program, it teaches you how to program with C++. This book complements those who already know something about programming, but are in need of direction.


Practical C++ Programming Review,  December 17 1998
Submitted by Robert   [Respond | View]



This book may not be bad for beginners, but definitely not professional book for professional people to read.


Practical C++ Programming Review,  December 10 1998
Submitted by ayerkes@genxnet.com   [Respond | View]



Excellent treatment of C++, however, I discovered an
error in the author's treatment of little endian
platforms. The following code example proves that
the code example on page 449 is incorrect for most 32
bit little endian platforms including intel, which is
specified in the list of little-endian platforms on
page 448. I have known very few pieces of hardware
using the rather exotic scheme described in the book.

endian.c:

#include <stdio.h>

int main() {
int i;
int fourbyteint;
char *ptr;

fourbyteint = 0x11223344;
ptr = &fourbyteint;

for( i = 0; i < sizeof( int ); i++ ) {
printf( "%02x ", (0xff & ptr[i]) );
}
printf( "\n" );
}

On little endian machines which are >16 bit,
the output will be

44 33 22 11

and on big endian machines, the output will be

11 22 33 44



Media reviews "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

See larger cover