Open main menu

CDOT Wiki β

Changes

Team J - OOP344 20133

903 bytes added, 18:52, 24 October 2013
Coding Style and Standards
== Coding Style and Standards ==
 * No Tab Character allowed. (replace tabs with 4 spaces)
* Each object must have its own type:
<big><syntaxhighlight lang="cpp">
int b;
CDialog D;
</syntaxhighlight></big>
 
* '''Curly Braces:''' The opening curly brace should be placed on it's own line underneath the class declaration, function name, etc.
 
<big><syntaxhighlight lang="cpp">
 
foo()
 
{
 
//Code
 
}
</syntaxhighlight></big>
 
 
* '''Variable Naming:''' The first word in a variable name is in lower case and uppercase letters mark the beginning of a new word. Use an underscore before the variable name to identify it as a private member of a class.
 
<big><syntaxhighlight lang="cpp">
varName;
 
class foo
 
{
 
private:
 
_varName;
 
}
</syntaxhighlight></big>
 
 
* '''Commenting:''' A comment should be made at the top of each file listing the name of the file, the last person to edit it, the date and time it was last modified and the current status of the file.
 
<big><syntaxhighlight lang="cpp">
/*
 
filename.cpp
 
Your Name
 
Last Modified: October, 24th, 2013
 
status: incomplete
 
*/.
</syntaxhighlight></big>