DIMAJIX - software consulting (http://www.dimajix.de/)
 

C++ Style Guide

Kaya Memisoglu

4. January 2005

Many people who start developing software in a team are confronted with a coding style guide, which might be a recommendation but more often it is a mandatory piece of paper. Of course the fact that their freedom of programming the way they would like is restricted often causes frustration in the beginning. But if you have worked on a big project with many different people you quickly begin to realize that not only the requirements of the program that is worked on are important, but also some sort of common language and programming style is essential for the success of the project.

But there is more to a style guide than a set of rules describing how variables should be called. A good style guide also contains many rules that relate to more general aspects of programming that help to ensure a high quality and help to avoid bugs. These guidelines include the proper use of public, protected and private sections in a class, the correct usage of the virtual keyword etc. Many of these items should be clear to the experienced programmer, but it is always a good idea to be aware of these rules and to know why they exist.

There is also a PDF Version of this document freely available for download.


Kaya Memisoglu 2005-01-06