next up previous contents
Next: Variables Up: General Naming Conventions Previous: Class Names   Contents

Begin all class and struct names with C or a unique project specific identifier

The C denotes that the data type being used is a class or struct and helps distinguish between data types and variables. Alternatively you can use two or three character identifiers such as Ve (VirtualExplorer), Ldw (Large Data Visualization) to indicate to which project these files belong.

frameround=fttt, language=C++


1#1

Compared to:


2#2

The major advantage modifying class names with a prefix such as C is that you can then use the class name without the prefix as a variable name. How often have you named a class one thing, say line, then when you create some objects you end up mangling line to be lin, aline, line1, Line, lne, etc. If you prefix your class name you can name your variables naturally, in the case of CLine: Line, LineA, LineB, etc.


next up previous contents
Next: Variables Up: General Naming Conventions Previous: Class Names   Contents
Falko Kuester 2001-08-24