Books & Videos

Table of Contents

  1. Chapter 1 Building C++ Applications

    1. Introduction to Building

    2. Obtaining and Installing GCC

    3. Building a Simple "Hello, World" Application from the Command Line

    4. Building a Static Library from the Command Line

    5. Building a Dynamic Library from the Command Line

    6. Building a Complex Application from the Command Line

    7. Installing Boost.Build

    8. Building a Simple "Hello, World" Application Using Boost.Build

    9. Building a Static Library Using Boost.Build

    10. Building a Dynamic Library Using Boost.Build

    11. Building a Complex application Using Boost.Build

    12. Building a Static Library with an IDE

    13. Building a Dynamic Library with an IDE

    14. Building a Complex Application with an IDE

    15. Obtaining GNU make

    16. Building A Simple "Hello, World" Application with GNU make

    17. Building a Static Library with GNU Make

    18. Building a Dynamic Library with GNU Make

    19. Building a Complex Application with GNU make

    20. Defining a Macro

    21. Specifying a Command-Line Option from Your IDE

    22. Producing a Debug Build

    23. Producing a Release Build

    24. Specifying a Runtime Library Variant

    25. Enforcing Strict Conformance to the C++ Standard

    26. Causing a Source File to Be Linked Automatically Against a Specified Library

    27. Using Exported Templates

  2. Chapter 2 Code Organization

    1. Introduction

    2. Making Sure a Header File Gets Included Only Once

    3. Ensuring You Have Only One Instance of a Variable Across Multiple Source Files

    4. Reducing #includes with Forward Class Declarations

    5. Preventing Name Collisions with Namespaces

    6. Including an Inline File

  3. Chapter 3 Numbers

    1. Introduction

    2. Converting a String to a Numeric Type

    3. Converting Numbers to Strings

    4. Testing Whether a String Contains a Valid Number

    5. Comparing Floating-Point Numbers with Bounded Accuracy

    6. Parsing a String Containing a Number in Scientific Notation

    7. Converting Between Numeric Types

    8. Getting the Minimum and Maximum Values for a Numeric Type

  4. Chapter 4 Strings and Text

    1. Introduction

    2. Padding a String

    3. Trimming a String

    4. Storing Strings in a Sequence

    5. Getting the Length of a String

    6. Reversing a String

    7. Splitting a String

    8. Tokenizing a String

    9. Joining a Sequence of Strings

    10. Finding Things in Strings

    11. Finding the nth Instance of a Substring

    12. Removing a Substring from a String

    13. Converting a String to Lower- or Uppercase

    14. Doing a Case-Insensitive String Comparison

    15. Doing a Case-Insensitive String Search

    16. Converting Between Tabs and Spaces in a Text File

    17. Wrapping Lines in a Text File

    18. Counting the Number of Characters, Words, and Lines in a Text File

    19. Counting Instances of Each Word in a Text File

    20. Add Margins to a Text File

    21. Justify a Text File

    22. Squeeze Whitespace to Single Spaces in a Text File

    23. Autocorrect Text as a Buffer Changes

    24. Reading a Comma-Separated Text File

    25. Using Regular Expressions to Split a String

  5. Chapter 5 Dates and Times

    1. Introduction

    2. Obtaining the Current Date and Time

    3. Formatting a Date/Time as a String

    4. Performing Date and Time Arithmetic

    5. Converting Between Time Zones

    6. Determining a Day's Number Within a Given Year

    7. Defining Constrained Value Types

  6. Chapter 6 Managing Data with Containers

    1. Introduction

    2. Using vectors Instead of Arrays

    3. Using vectors Efficiently

    4. Copying a vector

    5. Storing Pointers in a vector

    6. Storing Objects in a list

    7. Mapping strings to Other Things

    8. Using Hashed Containers

    9. Storing Objects in Sorted Order

    10. Storing Containers in Containers

  7. Chapter 7 Algorithms

    1. Introduction

    2. Iterating Through a Container

    3. Removing Objects from a Container

    4. Randomly Shuffling Data

    5. Comparing Ranges

    6. Merging Data

    7. Sorting a Range

    8. Partitioning a Range

    9. Performing Set Operations on Sequences

    10. Transforming Elements in a Sequence

    11. Writing Your Own Algorithm

    12. Printing a Range to a Stream

  8. Chapter 8 Classes

    1. Introduction

    2. Initializing Class Member Variables

    3. Using a Function to Create Objects (a.k.a. Factory Pattern)

    4. Using Constructors and Destructors to Manage Resources (or RAII)

    5. Automatically Adding New Class Instances to a Container

    6. Ensuring a Single Copy of a Member Variable

    7. Determining an Object's Type at Runtime

    8. Determining if One Object's Class Is a Subclass of Another

    9. Giving Each Instance of a Class a Unique Identifier

    10. Creating a Singleton Class

    11. Creating an Interface with an Abstract Base Class

    12. Writing a Class Template

    13. Writing a Member Function Template

    14. Overloading the Increment and Decrement Operators

    15. Overloading Arithmetic and Assignment Operators for Intuitive Class Behavior

    16. Calling a Superclass Virtual Function

  9. Chapter 9 Exceptions and Safety

    1. Introduction

    2. Creating an Exception Class

    3. Making a Constructor Exception-Safe

    4. Making an Initializer List Exception-Safe

    5. Making Member Functions Exception-Safe

    6. Safely Copying an Object

  10. Chapter 10 Streams and Files

    1. Introduction

    2. Lining Up Text Output

    3. Formatting Floating-Point Output

    4. Writing Your Own Stream Manipulators

    5. Making a Class Writable to a Stream

    6. Making a Class Readable from a Stream

    7. Getting Information About a File

    8. Copying a File

    9. Deleting or Renaming a File

    10. Creating a Temporary Filename and File

    11. Creating a Directory

    12. Removing a Directory

    13. Reading the Contents of a Directory

    14. Extracting a File Extension from a String

    15. Extracting a Filename from a Full Path

    16. Extracting a Path from a Full Path and Filename

    17. Replacing a File Extension

    18. Combining Two Paths into a Single Path

  11. Chapter 11 Science and Mathematics

    1. Introduction

    2. Computing the Number of Elements in a Container

    3. Finding the Greatest or Least Value in a Container

    4. Computing the Sum and Mean of Elements in a Container

    5. Filtering Values Outside a Given Range

    6. Computing Variance, Standard Deviation, and Other Statistical Functions

    7. Generating Random Numbers

    8. Initializing a Container with Random Numbers

    9. Representing a Dynamically Sized Numerical Vector

    10. Representing a Fixed-Size Numerical Vector

    11. Computing a Dot Product

    12. Computing the Norm of a Vector

    13. Computing the Distance Between Two Vectors

    14. Implementing a Stride Iterator

    15. Implementing a Dynamically Sized Matrix

    16. Implementing a Constant-Sized Matrix

    17. Multiplying Matricies

    18. Computing the Fast Fourier Transform

    19. Working with Polar Coordinates

    20. Performing Arithmetic on Bitsets

    21. Representing Large Fixed-Width Integers

    22. Implementing Fixed-Point Numbers

  12. Chapter 12 Multithreading

    1. Introduction

    2. Creating a Thread

    3. Making a Resource Thread-Safe

    4. Notifying One Thread from Another

    5. Initializing Shared Resources Once

    6. Passing an Argument to a Thread Function

  13. Chapter 13 Internationalization

    1. Introduction

    2. Hardcoding a Unicode String

    3. Writing and Reading Numbers

    4. Writing and Reading Dates and Times

    5. Writing and Reading Currency

    6. Sorting Localized Strings

  14. Chapter 14 XML

    1. Introduction

    2. Parsing a Simple XML Document

    3. Working with Xerces Strings

    4. Parsing a Complex XML Document

    5. Manipulating an XML Document

    6. Validating an XML Document with a DTD

    7. Validating an XML Document with a Schema

    8. Transforming an XML Document with XSLT

    9. Evaluating an XPath Expression

    10. Using XML to Save and Restore a Collection of Objects

  15. Chapter 15 Miscellaneous

    1. Introduction

    2. Using Function Pointers for Callbacks

    3. Using Pointers to Class Members

    4. Ensuring That a Function Doesn't Modify an Argument

    5. Ensuring That a Member Function Doesn't Modify Its Object

    6. Writing an Operator That Isn't a Member Function

    7. Initializing a Sequence with Comma-Separated Values

  1. Colophon