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

后端 未结 7 1764
猫巷女王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:05

    It's not required to be all caps. It's just the common convention. I usually use something like #ifndef MYHEADER_H_INCLUDED.

提交回复
热议问题