Any time a method or implementation is changed, the comment must be changed as well. Keeping comments current is essential to their usefulness. If comments frequently are out of date, people start to ignore all comments. Comment Templates Use the following templates for declaration and header comments. Replace capitalized words in the templates with appropriate content.
Constants Use constants.
Ideally, there should be no actual numbers other than 0 and 1 in your code. Declare parameters, variables, return values, and member functions to be const wherever possible. Use const references when passing data of over 4 bytes by value. When you pass data by reference , so that the function may modify the actual parameter, do not use references. Instead, use pointers in the same way you would in ANSI C. 5.