解决方法error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

来源:互联网 发布:能组队的手游 知乎 编辑:程序博客网 时间:2024/05/20 10:20

VS2008编译运行出现如下错误:

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

这是因为在VS中,若是没有显示的指定返回值类型,编译器将其视为默认整型。然则vs2008不支撑默认整型。

解决方法:

打开project-> Properties(最底下)->configuration->C/C++ ->Command Line,增加/wd4430选项。


原创粉丝点击