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

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选项。

解决方法error C4430: missing type specifier - int assumed. Note: C++ does not support default-int_第1张图片

你可能感兴趣的:(解决方法error C4430: missing type specifier - int assumed. Note: C++ does not support default-int)