Saturday, 10 December 2016

dos and don'ts of writing c++ code

  1. Use namespaces - when you have huge code and classes, add them into a name spaces by categorizing them. Like a namespace for database, namespace for logger, namespace for ui etc. 
  2. Follow C++ coding conventions and remain consistent in project and with team ( and with global c++ community).
  3. In header files, avoid the use of forward declaration as much as possible and included the required header files.

No comments:

Post a Comment