Can I display the value of an enum with printf()?

后端 未结 6 843
太阳男子
太阳男子 2020-12-24 05:13

Is there a one-liner that lets me output the current value of an enum?

6条回答
  •  余生分开走
    2020-12-24 05:54

    Some dude has come up with a smart preprocessor idea in this post

    Easy way to use variables of enum types as string in C?

提交回复
热议问题