Compiler Error C2577
'member' : destructor/finalizer cannot have a return type
A destructor or finalizer cannot return a value of void
or any other type. Remove the return
statement from the destructor definition.
Example
The following sample generates C2577.
// C2577.cpp
// compile with: /c
class A {
public:
A() {}
~A(){
return 0; // C2577
}
};
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