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() {
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for