C++ #ifndef for include files, why is all caps used for the header file?

后端 未结 7 1815
猫巷女王i
猫巷女王i 2021-01-06 12:32

I wonder why the name after the #ifndef directive is always all caps and don\'t seem to match the name of the actual header file? What are the rules surrounding

7条回答
  •  难免孤独
    2021-01-06 13:09

    These are preprocessor symbols and have no such rules. (as long as they match the #defines in the headers)

    However, convention is to use all-caps for preprocessor symbols.

提交回复
热议问题