Home Page Icon
Home Page
Table of Contents for
Dedication
Close
Dedication
by Vladimir Kushnir
Safe C++
Safe C++
Dedication
SPECIAL OFFER: Upgrade this ebook with O’Reilly
Preface
Audience
How This Book Is Organized
Conventions Used in This Book
Naming Conventions
Using Code Examples
Safari® Books Online
How to Contact Us
Acknowledgments
I. A Bug-Hunting Strategy for C++
1. Where Do C++ Bugs Come From?
2. When to Catch a Bug
Why the Compiler Is Your Best Place to Catch Bugs
How to Catch Bugs in the Compiler
The Proper Way to Handle Types
3. What to Do When We Encounter an Error at Runtime
II. Bug Hunting: One Bug at a Time
4. Index Out of Bounds
Dynamic Arrays
Static Arrays
Multidimensional Arrays
5. Pointer Arithmetic
6. Invalid Pointers, References, and Iterators
7. Uninitialized Variables
Initialized Numbers (int, double, etc.)
Uninitialized Boolean
8. Memory Leaks
Reference Counting Pointers
Scoped Pointers
Enforcing Ownership with Smart Pointers
9. Dereferencing NULL Pointers
10. Copy Constructors and Assignment Operators
11. Avoid Writing Code in Destructors
12. How to Write Consistent Comparison Operators
13. Errors When Using Standard C Libraries
III. The Joy of Bug Hunting: From Testing to Debugging to Production
14. General Testing Principles
15. Debug-On-Error Strategy
16. Making Your Code Debugger-Friendly
17. Conclusion
A. Source Code for the scpp Library Used in This Book
B. Source Code for the files scpp_assert.hpp and scpp_assert.cpp
C. Source Code for the file scpp_vector.hpp
D. Source Code for the file scpp_array.hpp
E. Source Code for the file scpp_matrix.hpp
F. Source Code for the file scpp_types.hpp
G. Source Code for the file scpp_refcountptr.hpp
H. Source Code for the file scpp_scopedptr.hpp
I. Source Code for the file scpp_ptr.hpp
J. Source Code for the file scpp_date.hpp and scpp_date.cpp
Index
About the Author
Colophon
SPECIAL OFFER: Upgrade this ebook with O’Reilly
Copyright
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Safe C++
Next
Next Chapter
SPECIAL OFFER: Upgrade this ebook with O’Reilly
To Daria and Misha
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset