64 bit enum in C++?

后端 未结 10 1797
陌清茗
陌清茗 2020-12-09 16:35

Is there a way to have a 64 bit enum in C++? Whilst refactoring some code I came across bunch of #defines which would be better as an enum, but being greater than 32 bit ca

10条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 17:09

    In MSVC++ you can do this:

    enum MYLONGLONGENUM:__int64 { BIG_KEY=0x3034303232303330, ... };

提交回复
热议问题