Difference between revisions of "C/C++"
From HCL
(→Coding) |
|||
Line 1: | Line 1: | ||
== Coding == | == Coding == | ||
+ | * [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 techniques from third-party software |
== Commenting == | == Commenting == |
Revision as of 17:50, 4 February 2010
Contents
Coding
- Coding header files
- One-true-brace ident style
- Learn from examples and use techniques 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