Compiler Error C2562
'identifier' : 'void' function returning a value
The function is declared as void
but returns a value.
This error can be caused by an incorrect function prototype.
This error may be fixed if you specify the return type in the function declaration.
The following sample generates C2562:
// C2562.cpp
// compile with: /c
void testfunc() {
int i;
return i; // C2562 delete the return to resolve
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for