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

Description

  • 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
Introduction.

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.

Index.

Download the 1st bonus chapter
Code downloads for this title are available here.
Download
Code Downloads
Code downloads for this title are available here.
Download
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
Download the sample code files for the book
Download
ChapterPageDetailsDatePrint Run
6Error in Text
Reads:
"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 ..."
04/13/07

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

the first line:

int ;

should be:

int i;



AND



The last line in the table should begin with |=
08/18/08

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.
4/21/05

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;
06/01/2006

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

should be:
"Hello, World".
5/05/06

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

should be:

const float kVersionNumber = 2.0;
3/21/05

38Error in Code
#include should be: #include
08/18/08

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) {
08/12/08

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

65Error in Text
line 10:

Text reads:
"tthat he programmer"

Should be:
"that the programmer".
08/18/2006

131Error in Text
Typo in 12th Last Line

"...are rigidly definedm,..."
should be:
"...are rigidly defined,..."
8/26/05

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

should be:
"given set of blueprints"
3/28/06

181Error in Text
In paragraph following second code snippet:

But now s1

should be:
But now s2
08/19/08

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.
2/26/07

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

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

202Typo
number of types

should be:
number or types
7/27/06

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) {

set(0);

}

else {

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

return (*this);

}
03/21/09

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

Should be

“... object itself so the constructor..."
5/16/05

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

Should be

"... data member or method were..."
5/16/05

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.
3/21/05

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

Should be

"... the cases that you are likely to encounter.
5/16/05

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

"Foo& myFooReferenceToBar;"

should be

"Foo& myFooReferenceToBar = myBar;"
06/25/2008

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

Should be

"... definition might look similar..."
5/16/05

277Error in Text
Line 21:
GameBoard**

should be:
GamePiece**
2/23/06

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

Should be

"... once. get() is most commonly used..."
5/16/05

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.
5/16/05

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;
}
5/16/05

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

should be

"...(usually named "en_US" to the..."
5/16/05

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

Should be

"...even more important than the use..."
5/16/05

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

Should be

"...one had been thrown originally."
5/16/05

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

Should be

> "..."first come, first served" basis."
5/16/05

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

Should be

"...an example of funcOne() using..."
5/16/05

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

It should read:

CppUnit::Test* ObjectPoolTest::suite()
{
....
}
6/20/09

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

"Standrad Library Reference resource ..."

should be:

"Standard ..."
06/25/2008

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

"... between different machine and applications."

should be:

"... machines and applications."
06/25/2008

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 ..."
11/20/2010