有没有办法改变枚举设置其常量值的方式?通常它会增加一,但我想应用另一条规则。在 PAWN 中这可以工作
enum (<<=1) { a = 1,//0b001 b,//0b010 c//0b100 }
有没有办法在 C++ 中做到这一点?
c++ enums increment rule
c++ ×1
enums ×1
increment ×1
rule ×1