Changes

Jump to: navigation, search

Team E - OOP344 20133

256 bytes added, 10:59, 29 October 2013
Coding Style and Standards
* No tab characters allowed.
* Indents composed of '''4''' spaces.
* Include guards composed of TEAM-E followed by file name and type:
<syntaxhighlight lang="cpp">
//For header file "Example.h"
#ifndef TEAM-E_EXAMPLE_H
#define TEAM-E_EXAMPLE_H
</syntaxhighlight>
* Each object must be declared separately:
<syntaxhighlight lang="cpp">
//Proper declaration
int a;
int b;
CDialog D;
 
//Improper declaration
int a, b;
CDialog D;
</syntaxhighlight>
void method(int param1, double param2, char* param3);
</syntaxhighlight>
* Declare variable counter variables before use inside loop (as opposed to declaration inside loop)loops:
<syntaxhighlight lang="cpp">
//Proper declaration
int i;
for (i = 0; i <= 5; i ++) {
printf(cout << "what?i = ")<< i << endl;
}
//Improper declaration
for (int i = 0; i <= 5; i ++) {
printf(cout << "what?i = ")<< i << endl;
}
</syntaxhighlight>

Navigation menu