编译器cl的参数的说明中有一行:
/TP compile all files as .cpp
这个应该就是你要的参数吧,在工程-〉设置里面可以设置debug的配置
其中在C/C++选项卡中就可以设置编译参数,加上/TP应该就可以了吧
上面的这个是C++的,MSDN中的解释能看懂吧:
/TC and /TP are "global" variants of /Tc and /Tp. They specify to the compiler to treat all files named on the command line as C source files (/TC) or C++ source files (/TP), without regard to location on the command line in relation to the option. These global options can be overridden on a single file via /Tc or /Tp.