1
edit
Changes
→Coding Style and Standards
== Coding Style and Standards ==
* No Tab Character allowed. (replace tabs with spaces)* Each object must have its own typeThe following will serve as an example of our coding standard:
<big><syntaxhighlight lang="cpp">
public:
int _a_data; // member Member variables should start with an underscore int _arraySize // use Use meaningful names for variables when applicable and use camel notationlower Camel Case int _width; // Every object have its own type char* _pArray; // pointers Pointers should have '*' part of the type
};
#endif ... #include </syntaxhighlightiostream>#include <cstring>using namespace std; int main() { int a = 0; //bigIndentation is 2 spaces int b = 1; // NO Tab characters allowed! Replace every tab character with 2 spaces. char name[] = "Spoom"; // Put a newline after variable declaration if(a >b ? a : b) { a = a * For the safeguard for header filesb; // Put a space between EVERY variable and operator } // Put a newline after a control structure if(!strcmp(name, we "Spoom")) { cout << "Welcome, Spoom!" << endl; // Every statement within a control structure will use the following: } // be wrapped in braces, even if there is only 1 line else { cout <big><syntaxhighlight lang="cppGet out."><< endl; } return 0;__BDOT_FILENAME_H__}
</syntaxhighlight></big>