Skip to content

guidelines

r4d2 edited this page Jan 10, 2014 · 17 revisions

C++ Programming Guidelines

We base our style and best practice guidelines on the ones at geosoft.no with a few modifications.

Style guideline additions:

  • 11. Don't use the underscore _ suffix for private members.
  • 24. We use the Id suffix instead of the No suffix.
  • 34. We use the file extensions .cpp and .hpp.
  • 36. In some cases it might be permitted to define methods in the header files (e.g. when templating)
  • 58. break and continue are permitted.
  • 70. Use nullptr for Null-Pointers instead of 0 or NULL
  • 75. For the else block, either put opening and closing bracket on the same line or both on separate lines. // DO: if ( ) { // do something } else { // do something else }
  • list ctd

Clone this wiki locally