如何在VISUAL C ++防爆preSS 2008年禁用接口关键字? [英] How to disable interface keyword on visual C++ Express 2008?
问题描述
我在这里编译一个传统的C code和有很多的名为界面中的变量和结构成员,但VC2008前preSS抱怨这些,你知道如何禁用此?
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 disable this?
我已经更改的设置编译code仅作为C code,但对此没有影响。
I already changed settings to compile the code only as a C code, but no effect on this.
推荐答案
做一个
#define interface QQInterface
您code(例如在头文件),这种方式到处其中关键字接口被使用时,编译器看到QQInterface,这不是关键字之前。如果所有code包括此定义,你不会得到编译器或链接错误。
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.
这篇关于如何在VISUAL C ++防爆preSS 2008年禁用接口关键字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!