Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Error C2577

Error Message

'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
   }
};
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.