Compiler Error C2391

'identifier' : 'friend' cannot be used during type definition

A complete class declaration was given in a friend declaration.

A friend declaration can specify a member function or an elaborated type specifier, but not a complete class declaration.

The following is an example of this error:

class D { void func( int ); };

class A {
   friend class B { int i; };   // error
   friend class C;              // OK
   friend void D::func(int);    // OK
};