Class names that start with C

User1 picture User1 · Feb 18, 2010 · Viewed 10.5k times · Source

The MFC has all class names that start with C. For example, CFile and CGdiObject. Has anyone seen it used elsewhere? Is there an official naming convention guide from Microsoft that recommends this style? Did the idea originate with MFC or was it some other project?

Answer

Earlz picture Earlz · Feb 18, 2010

It's evil. Don't use Hungarian Notation for anything but abstracted things.

For instance, btnSubmit is ok to describe a button named Submit(which would have an accompanying lblSubmit for the label next to the button)

But things like CMyClass for Class and uiCount for unsigned integer named count does not help programmers and just leads to extra wasteful typing.