Compiler Error C2639

Visual Studio 6.0

compiler generated default constructor required by unnamed class

A default constructor was required for an unnamed class, structure, or union. A name is required for a constructor to be generated.

The following is an example of this error:

class A
{
public:
   A();      // default constructor declaration
};

class C
{
public:
   struct    // unnamed struct
   {
      A a;
   } s1;     // error detected here
   struct S  // named struct
   {
      A a;
   } s2;     // OK
};
Show: