Possible to convert list of #defines into strings

前端 未结 8 1118
梦谈多话
梦谈多话 2021-02-05 22:45

Suppose I have a list of #defines in a header file for an external library. These #defines represent error codes returned from functions. I want to wri

8条回答
  •  终归单人心
    2021-02-05 23:31

    #define FOO 1 is handled by the preprocessor as a simple text replacement. If you want to preserve those definitions, you need the giant switch.

提交回复
热议问题