Books & Videos

Table of Contents

  1. A Bug-Hunting Strategy for C++

    1. Chapter 1 Where Do C++ Bugs Come From?

    2. Chapter 2 When to Catch a Bug

      1. Why the Compiler Is Your Best Place to Catch Bugs
      2. How to Catch Bugs in the Compiler
      3. The Proper Way to Handle Types
    3. Chapter 3 What to Do When We Encounter an Error at Runtime

  2. Bug Hunting: One Bug at a Time

    1. Chapter 4 Index Out of Bounds

      1. Dynamic Arrays
      2. Static Arrays
      3. Multidimensional Arrays
    2. Chapter 5 Pointer Arithmetic

    3. Chapter 6 Invalid Pointers, References, and Iterators

    4. Chapter 7 Uninitialized Variables

      1. Initialized Numbers (int, double, etc.)
      2. Uninitialized Boolean
    5. Chapter 8 Memory Leaks

      1. Reference Counting Pointers
      2. Scoped Pointers
      3. Enforcing Ownership with Smart Pointers
    6. Chapter 9 Dereferencing NULL Pointers

    7. Chapter 10 Copy Constructors and Assignment Operators

    8. Chapter 11 Avoid Writing Code in Destructors

    9. Chapter 12 How to Write Consistent Comparison Operators

    10. Chapter 13 Errors When Using Standard C Libraries

  3. The Joy of Bug Hunting: From Testing to Debugging to Production

    1. Chapter 14 General Testing Principles

    2. Chapter 15 Debug-On-Error Strategy

    3. Chapter 16 Making Your Code Debugger-Friendly

    4. Chapter 17 Conclusion

    5. Appendix Source Code for the scpp Library Used in This Book

    6. Appendix Source Code for the files scpp_assert.hpp and scpp_assert.cpp

    7. Appendix Source Code for the file scpp_vector.hpp

    8. Appendix Source Code for the file scpp_array.hpp

    9. Appendix Source Code for the file scpp_matrix.hpp

    10. Appendix Source Code for the file scpp_types.hpp

    11. Appendix Source Code for the file scpp_refcountptr.hpp

    12. Appendix Source Code for the file scpp_scopedptr.hpp

    13. Appendix Source Code for the file scpp_ptr.hpp

    14. Appendix Source Code for the file scpp_date.hpp and scpp_date.cpp

  1. Colophon