Open main menu

Difference between revisions of "Code Formatting Conventions"

→‎Naming: change "classes" naming section to general type nameing
(→‎Whitespaces: add section about references)
(→‎Naming: change "classes" naming section to general type nameing)
Line 160: Line 160:
(As a side remark, we recommend avoiding #define for creating constants, because these can lead to weird and difficult to track down conflicts. Instead use enums or the <code>const</code> keyword.)
(As a side remark, we recommend avoiding #define for creating constants, because these can lead to weird and difficult to track down conflicts. Instead use enums or the <code>const</code> keyword.)


'''Classes'''
'''Type names'''


Camel case starting with upper case.
Camel case starting with upper case.


<syntax type="C++">
<syntax type="C++">
class MeClass() {
class MeClass() { /* ... */ }
struct MeStruct() { /* ... */ }
typedef int MyInt;
</syntax>
</syntax>


561

edits