Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 638 Bytes

compiler-error-c2863.md

File metadata and controls

33 lines (26 loc) · 638 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2863
Compiler Error C2863
11/04/2016
C2863
C2863
32561d67-a795-486b-b3b6-4b90a1acb176

Compiler Error C2863

'interface' : an interface cannot have friends

Declaring friends on an interface is not allowed.

The following sample generates C2863:

// C2863.cpp
// compile with: /c
#include <unknwn.h>

class CMyClass {
   void *f();
};

__interface IMyInterface {
   void g();

   friend int h();   // 2863
   friend interface IMyInterface1;  // C2863
   friend void *CMyClass::f();  // C2863
};