23.4. Naming conventions

The naming conventions in MFC programs are that the MFC class names all start with a capital C, and the class member functions are all written as run-together phrases in which each word is capitalized. FillSolidRect is an example of such a function name.

We’re free to give our variables any kinds of names we want, but since MFC programs are so big and cumbersome, we try and make the names as helpful as possible. A good variable name will give you (a) information about the type of the class the variable is an instance of, and (b) information about the meaning of your variable inside the program. A common convention is to give our variables names which start with some letters to remind us of the type of the variable, and ...

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.