Chapter 29

Ten Ways to Avoid Adding Bugs to Your Program

In This Chapter

arrow Enabling all warnings and error messages

arrow Using a clear and consistent coding style

arrow Limiting the visibility

arrow Adding comments to your code while you write it

arrow Single-stepping every path at least once

arrow Avoiding overloaded operators

arrow Heap handling

arrow Using exceptions to handle errors

arrow Declaring destructors to be virtual

arrow Avoiding multiple inheritance

In this chapter, I look at several ways to minimize errors, as well as ways ...

Get C++ For Dummies, 7th Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.