Compiler Error C3874

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3874.

return type of 'function' should be 'int' instead of 'type'

A function does not have the return type that was expected by the compiler.

The following sample generates C3874:

// C3874b.cpp  
double main()  
{   // C3874  
}  

Show: