Difference between revisions of "C/C++"
From HCL
(→Coding) |
(→Coding) |
||
Line 2: | Line 2: | ||
* [http://en.wikipedia.org/wiki/Pragma_once Coding header files] | * [http://en.wikipedia.org/wiki/Pragma_once Coding header files] | ||
* [http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS One-true-brace ident style] | * [http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS One-true-brace ident style] | ||
− | * Learn from examples and use | + | * Learn from examples and use coding approaches from third-party software |
== Commenting == | == Commenting == |
Revision as of 17:51, 4 February 2010
Contents
Coding
- Coding header files
- One-true-brace ident style
- Learn from examples and use coding approaches from third-party software
Commenting
- Place Doxygen comments in header files (before declarations of namespaces/classes/structs/typedefs/macros) and main source files (for documenting tools and tests)
- Use double forward slash for short comments in the code
C++
General
- Don't use non-standard functions, like itoa
- Dynamic loading of shared libraries