- Diagnostics are not enabled.
- Useconstandinlinerather than#define. Note that you will only get this in user code, not system header code.
- Use<iostream>rather than<stdio.h>.
- Usenewanddeleterather thanmallocandfree.
- Use C++ style comments in preference to C style comments. C comments in system headers are not diagnosed.
- Usedeleteon pointer members in destructors. The compiler diagnoses any pointer that does not have adelete.
- Make sure you have a user copy constructor and assignment operator in classes containing pointers.
- Use initialization rather than assignment to members in constructors.
- Make sure the initialization list ordering matches the declartion list ordering in constructors.
- Make sure base classes have virtual destructors.
- Make sureoperator=returns*this.
- Make sure prefix forms of increment and decrement return aconstobject.
- Never overload operators&&,||, and,.
- Effective C++ Second Edition - 50 Specific Ways to Improve Your Programs and Designs
- More Effective C++ - 35 New Ways to Improve Your Programs and Designs