在VS2005中生成时出错:error C4430: missing type specifier - int assumed. Note: C++ does not support default

来源:互联网 发布:我的世界mac中文输入 编辑:程序博客网 时间:2024/05/02 02:35

在VS2005中生成时出错:error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

这是因为在VC6中,如果没有显示的指定返回值类型,编译器将其视为默认整型。但是vs2005不支持默认整型。

解决方法如下:
打开:项目----项目属性----配置属性----C/C++----命令行,在附加选项那里添加/wd4430这个选项。

英文:

.cpp---Properties---C/C++---Command line ----Additional options----写上/wd4430

原创粉丝点击