Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

2 C++ Coding Standards 0. Don't sweat the small stuff. (Or: Know what not to standardize.) Summary Say only what needs saying: Don't enforce personal tastes or obsolete practices. Discussion Issues that are really just personal taste and don't affect correctness or readability don't belong in a coding standard. Any professional programmer can easily read and write code that is formatted a little differently than they're used to. Do use consistent formatting within each source file or even each project, because it's jarring to jump around among several styles in the same piece of code. But don't try to enforce consistent formatting across multiple projects or across a company. Here are several common issues where the important thing is not to set a rule but just to be consistent with the style already in use within the file you're maintaining: Don't specify how much to indent, but do indent to show structure: Use any number