Compiler Error C2631

'class' : destructors not allowed a return type

A destructor in the specified class, structure, or union was declared with a return type.

A destructor cannot be declared with a return type.

The following are examples of this error:

class C
{
   int ~C();   // error, returns int
   void ~C();  // error, returns void
   ~C();       // OK
};