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

后端 未结 6 751
遥遥无期
遥遥无期 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 12:13

    Problem is that MS #defines interface to struct so that

    interface Name {...}
    

    can be used in COM c++ code. (objbase.h:199: #define interface __STRUCT__)

    Just #undef interface after including Windows.h ..

提交回复
热议问题