'identifier' : 傳回值的 'void' 函式
備註
函式會宣告為 void ,但會傳回值。
此錯誤可能是因為函式原型不正確所造成。
如果您在函式宣告中指定傳回類型,可能會修正此錯誤。
Example
下列範例會產生 C2562:
// C2562.cpp
// compile with: /c
void testfunc() {
int i;
return i; // C2562 delete the return to resolve
}
'identifier' : 傳回值的 'void' 函式
函式會宣告為 void ,但會傳回值。
此錯誤可能是因為函式原型不正確所造成。
如果您在函式宣告中指定傳回類型,可能會修正此錯誤。
下列範例會產生 C2562:
// C2562.cpp
// compile with: /c
void testfunc() {
int i;
return i; // C2562 delete the return to resolve
}