Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 789 Bytes

compiler-error-c3745.md

File metadata and controls

40 lines (33 loc) · 789 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C3745
Compiler Error C3745
11/04/2016
C3745
C3745
1e64aec5-7e53-47e5-bc7d-3905230cfc66

Compiler Error C3745

'function': only an event can be 'raised'

Only a function defined with the __event keyword can be passed to the __raise keyword.

The following sample generates C3745:

// C3745.cpp
struct E {
   __event void func();
   void func(int) {
   }

   void func2() {
   }

   void bar() {
      __raise func();
      __raise func(1);   // C3745
      __raise func2();   // C3745
   }
};

int main() {
   E e;
   __raise e.func();
   __raise e.func(1);   // C3745
   __raise e.func2();   // C3745
}