Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 664 Bytes

compiler-error-c3736.md

File metadata and controls

34 lines (28 loc) · 664 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C3736
Compiler Error C3736
11/04/2016
C3736
C3736
579b773c-41e7-40ea-8382-2e3ce2667f4c

Compiler Error C3736

'event': must be a method or, in the case of managed events, optionally a data member

Native and COM events must be methods. .NET events can also be data members.

The following sample generates C3736:

// C3736.cpp
struct A {
   __event int e();
};

struct B {
   int f;   // C3736
   // The following line resolves the error.
   // int f();
   B(A* a) {
      __hook(&A::e, a, &B::f);
   }
};

int main() {
}