Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Compiler Warning (level 1) C4508

'function' : function should return a value; 'void' return type assumed

The function has no return type specified. The compiler assumes that the return type is void. To resolve the warning, explicitly declare the return type of functions. The following sample generates C4508:

// C4508.cpp
// compile with: /W1
func() {   // C4508

/* use the code below to resolve the warning
void func() {

int main() {

© 2015 Microsoft