Class names that start with C

前端 未结 12 1922
被撕碎了的回忆
被撕碎了的回忆 2020-12-20 13:44

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 Mic

12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-20 14:05

    That was a old C++ coding style, and MFC was probably one of the last things to use it.

    It was usually just a convention of C++ (and maybe a few other languages), and hence it started falling out of favor as the languages became more interoperable, through COM and then .NET.

    You still see it's cousin, the "I" prefix for interfaces, pretty often. I've always found it interesting that "I" survived when "C" died, but that was probably because interfaces were used so heavily in COM interoperability.

提交回复
热议问题