Thursday, June 2, 2011

Coding Style

Please refer to the wikipedia article on standard C++ programming conventions for more information and examples.

Indentation
Please use 4 spaces.

Vertical Spacing
Statements should be viewable from the screen without needing to scroll horizontally.

Braces
Braces related to the same function should align vertically.
 
if (a > 5)
{
  // This is ANSI C++ style
} 
 
Capitalization
Variables start with a lowercase letter.
Functions are written in camel case and should be descriptive.

MyFunction
 

No comments:

Post a Comment