- Indent
- use tab with four-space
- Line Width
- fixed width:
- Privilege margin
- public, protected, and then private
- alignment
- put space around operators, e.g. hamster = "cute"
- pointer: use int *a; rather than int* a; since the following situation adopts: int *a, *b;
- Naming
- Capital
- Constants: THIS_IS_CONSTANT
- Macro: #define ROUND(x) (int)(x+0.5)
- Ref: Mozilla
沒有留言:
張貼留言