Open main menu

CDOT Wiki β

Changes

Team E - OOP344 20133

266 bytes added, 10:04, 29 October 2013
Coding Style and Standards
<syntaxhighlight lang="cpp">
void method(int param1, double param2, char* param3);
</syntaxhighlight>
* Use braces for all applicable statements (even single line statements):
<syntaxhighlight lang="cpp">
//Proper use
if (value == 0) {
return true;
}
 
//Improper use
if (value == 0)
return true;
 
//Improper use
if (value == 0) return true;
</syntaxhighlight>
* Declare counter variables before use inside loops: