Difference between revisions of "C/C++"

From HCL
Jump to: navigation, search
Line 3: Line 3:
 
* [http://en.wikipedia.org/wiki/Pragma_once Coding header files]
 
* [http://en.wikipedia.org/wiki/Pragma_once Coding header files]
  
== General ==
+
== Commenting ==
* Don't use non-standard functions, like [http://en.wikipedia.org/wiki/Itoa itoa]
+
* Place [[Doxygen]] comments in header files (before declarations of namespaces/classes/structs/typedefs/macros) and main source files (for documenting tools and tests)
* [http://en.wikipedia.org/wiki/Shared_library#Shared_libraries Shared libraries] and [http://en.wikipedia.org/wiki/Dynamic_loading Dynamic loading]
+
* Use double forward slash for short comments in the code
  
 
== C++ ==
 
== C++ ==
 
* [http://developers.sun.com/solaris/articles/mixing.html Mixing C/C++]
 
* [http://developers.sun.com/solaris/articles/mixing.html Mixing C/C++]
 
* [http://en.wikipedia.org/wiki/Template_metaprogramming Template C++]
 
* [http://en.wikipedia.org/wiki/Template_metaprogramming Template C++]
 +
 +
== General ==
 +
* Don't use non-standard functions, like [http://en.wikipedia.org/wiki/Itoa itoa]
 +
* [http://en.wikipedia.org/wiki/Shared_library#Shared_libraries Shared libraries] and [http://en.wikipedia.org/wiki/Dynamic_loading Dynamic loading]

Revision as of 18:45, 28 January 2010

Coding

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