How to disable interface keyword on visual C++ Express 2008?

后端 未结 6 702
遥遥无期
遥遥无期 2021-01-18 11:11

I am compiling a legacy C code here and there is a lot of variables and struct members named \"interface\", but VC2008 express is complaining about these, do you know how to

6条回答
  •  隐瞒了意图╮
    2021-01-18 11:58

    Do a

    #define interface QQInterface
    

    before your code (eg. in the header file), this way everywhere where the keyword interface is used, the compilers sees "QQInterface", which is not a keyword. If all code includes this define, you will not get compiler or linker errors.

提交回复
热议问题