Skip to main content

Professional C++

Professional C++

Nicholas A. Solter, Scott J. Kleper

ISBN: 978-0-764-58949-2

Jan 2005

864 pages

Select type: E-Book

Product not available for purchase


  • Geared to experienced C++ developers who may not be familiar with the more advanced features of the language, and therefore are not using it to its full capabilities
  • Teaches programmers how to think in C++-that is, how to design effective solutions that maximize the power of the language
  • The authors drill down into this notoriously complex language, explaining poorly understood elements of the C++ feature set as well as common pitfalls to avoid
  • Contains several in-depth case studies with working code that's been tested on Windows, Linux, and Solaris platforms

Part I: Introduction to Professional C++.

Chapter 1: A Crash Course in C++.

Chapter 2: Designing Professional C++ Programs.

Chapter 3: Designing with Objects.

Chapter 4: Designing with Libraries and Patterns.

Chapter 5: Designing for Reuse.

Chapter 6: Maximizing Software-Engineering Methods.

Part II: C++ Coding the Professional Way.

Chapter 7: Coding with Style.

Chapter 8: Gaining Proficiency with Classes and Objects.

Chapter 9: Mastering Classes and Objects.

Chapter 10: Discovering Inheritance Techniques.

Chapter 11: Writing Generic Code with Templates.

Chapter 12: Understanding C++ Quirks and Oddities.

Part III: Mastering Advanced Features of C++.

Chapter 13: Effective Memory Management.

Chapter 14: Demystifying C++ I/O.

Chapter 15: Handling Errors.

Part IV: Ensuring Bug-Free Code.

Chapter 16: Overloading C++ Operators.

Chapter 17: Writing Efficient C++.

Chapter 18: Developing Cross-Platform and Cross-Language Applications.

Chapter 19: Becoming Adept at Testing.

Chapter 20: Conquering Debugging.

Chapter 21: Delving into the STL: Containers and Iterators.

Part V: Using Libraries and Patterns.

Chapter 22: Mastering STL Algorithms and Function Objects.

Chapter 23: Customizing and Extending the STL.

Chapter 24: Exploring Distributed Objects.

Chapter 25: Incorporating Techniques and Frameworks.

Chapter 26: Applying Design Patterns.

Appendix A: C++ Interviews.

Appendix B: Annotated Bibliography.


Download the 1st bonus chapter
Code downloads for this title are available here.
Code Downloads
Code downloads for this title are available here.
Download the 1st bonus chapter
Code downloads for this title are available here.
Code Downloads
Code downloads for this title are available here.
Download the 2nd bonus chapter
Download the sample code files for the book
ChapterPageDetailsDatePrint Run
6Error in Text
"Variables can be declared without being given a value. These undeclared variables ..."

Should read:
"Variables can be declared without being given a value. These uninitialized variables ..."

8Error in Table
the table for the "=" Oparator, within the Usage column:

the first line:

int ;

should be:

int i;


The last line in the table should begin with |=

13First sentence, Last Paragraph
Change the first sentence of the last paragraph in "The Ternary Operator" section on page 13 to read (adding the word "blocks"):

Unlike an if statement or a switch statement, the ternary operator doesn't execute code blocks based on the result.

14Error in Text
In the last paragraph above "Loops", the text reads:

...will short-circuit after the second term because 1 always evaluates to true.
bool result = bool1 && 1 && (i > 7) && !done;

It should read:

...will short-circuit after the second term because 0 always evaluates to false.
bool result = bool1 && 0 && (i > 7) && !done;

21Error in Punctuation
Section "String in C++":
"Hello, World."

should be:
"Hello, World".

25Error in Code, Middle of Page
const float kVersionNumber = "2.0";

should be:

const float kVersionNumber = 2.0;

38Error in Code
#include should be: #include

40Error in Code
the second code segment, in the doFire function definition:
there is a begin brace ( { ) missing at line 12 in the code segment:

the code line:
} catch (std::exception ex)

should be:
} catch (std::exception ex) {

64Error in Text
In the last paragraph, the third to the last sentence is missing a closing parenthesis, after the word "distinct".

65Error in Text
line 10:

Text reads:
"tthat he programmer"

Should be:
"that the programmer".

131Error in Text
Typo in 12th Last Line

"...are rigidly definedm,..."
should be:
"...are rigidly defined,..."

164Error in Text
Under "Using Objects", 2nd paragraph:
"given blueprints"

should be:
"given set of blueprints"

181Error in Text
In paragraph following second code snippet:

But now s1

should be:
But now s2

190Error in Spreadsheet
the int mWidth and int mHeight of Spreadsheet s1 are currently 2 and 2 respectively.

they should be:
4 and 3 respectively after a shallow copy of s1 = s2.

193Error in Code
code for copyFrom():
for (i = 0; i < mWidht; i++) {

should be:
for (i = 0; i < mWidth; i++) {

number of types

should be:
number or types

215Error in Code
The method for arithmetic shorthand operator /= lacks the check for division by zero. The first code box should include:

if (rhs.mValue == 0) {



else {

set(mValue / rhs.mValue); // Call set to update mValue and mString }

return (*this);


220Typo in 4th Last Line
"... object itself to the constructor..."

Should be

“... object itself so the constructor..."

226Typo in 3rd Last Line
"... data member of method were..."

Should be

"... data member or method were..."

10255Incorrect Behavior of the C++ Standard
It is incorrectly stated that you can change the signature of an inherited method by using a default argument. That behavior is not part of the C++ standard and the section implying so should be stricken from subsequent editions of the book.

256Typo in 6th Last Line
"... the cases that are likely to encounter."

Should be

"... the cases that you are likely to encounter.

260Error in Code
The last code snippet on page 260 is erroneous.

"Foo& myFooReferenceToBar;"

should be

"Foo& myFooReferenceToBar = myBar;"

273Typo in 12th Line
"... definition might look like similar..."

Should be

"... definition might look similar..."

277Error in Text
Line 21:

should be:

385Typo in 9th Last Line
"... once. () is most commonly used..."

Should be

"... once. get() is most commonly used..."

385Typo in Italicized Section
The italicized section describing the operators >> and << for streams has confused input stream and output stream.

The second and third sentences of the italicized section should read:

"In an output stream, << points toward the stream itself because data are being sent to the stream. In an input stream, >> points toward the variables because data are being stored."

The change is to swap "input" and "output" in the two sentences.

386Inconsistent Format in function readName ()
function readName() while not incorrect is inconsistently formatted It should look like this:

string readName(istream& inStream)
    string name;
    char next;
    while (inStream.get(next)) {
        name += next;

    return name;

398Typo in 4th Last Line
"...(usually named "en_U" to the..."

should be

"...(usually named "en_US" to the..."

400Typo in 7th Last Line
"...even more important that the use..."

Should be

"...even more important than the use..."

413Typo 6th Last Line
" had been throw originally."

Should be

" had been thrown originally."

418Typo in 1st Line After Boxed Text
"..."first come, first served" basic."

Should be

> "..."first come, first served" basis."

424Typo in 3rd Line
" example of funcTwo() using..."

Should be

" example of funcOne() using..."

519Error in Code
The new added ObjectPoolTest::suite() method definition lack a {

It should read:

CppUnit::Test* ObjectPoolTest::suite()

640Error in Text
Typo on the second line of page 640:

"Standrad Library Reference resource ..."

should be:

"Standard ..."

726Error in Text
Typo on page 726, last sentence of the first paragraph

"... between different machine and applications."

should be:

"... machines and applications."

69Error in Text
Minor typo (missing a space between two words).
In the table at the top of the page, the first sentence of the third bullet in the Is-A column reads "... hasone ..."

should be: "... has one ..."