diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3711.md b/docs/error-messages/compiler-errors-2/compiler-error-c3711.md index 16b395e4bf..8b7399ff2e 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3711.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3711.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3711" title: "Compiler Error C3711" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3711" +ms.date: 11/04/2016 f1_keywords: ["C3711"] helpviewer_keywords: ["C3711"] -ms.assetid: 26d581cc-2153-4ee0-b814-a371184be3e1 --- # Compiler Error C3711 -'method': an non-managed event source method must return void or an integral type +> 'method': an non-managed event source method must return void or an integral type + +## Remarks You defined a method in the event source that did not return void or an integral type. To fix this error, make the event and event handler have a return type of **`void`** or an integral type such as **`int`** or **`long`**. -The following sample generates C3711: +## Example + +The following example generates C3711: ```cpp // C3711.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3712.md b/docs/error-messages/compiler-errors-2/compiler-error-c3712.md index 99094e6dda..d7ac31955f 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3712.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3712.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3712" title: "Compiler Error C3712" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3712" +ms.date: 11/04/2016 f1_keywords: ["C3712"] helpviewer_keywords: ["C3712"] -ms.assetid: 65b1fcaf-be89-4c55-9e40-25ec03457253 --- # Compiler Error C3712 -'method': an event handler method must return the same type as the source 'method' +> 'method': an event handler method must return the same type as the source 'method' + +## Remarks You defined an event handler method that did not return the same type as the source event method. To fix this error, give the event handler method the same return type as that of the source event method. -The following sample generates C3712: +## Example + +The following example generates C3712: ```cpp // C3712.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3713.md b/docs/error-messages/compiler-errors-2/compiler-error-c3713.md index 9ab74b96bb..8949eafa8a 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3713.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3713.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3713" title: "Compiler Error C3713" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3713" +ms.date: 11/04/2016 f1_keywords: ["C3713"] helpviewer_keywords: ["C3713"] -ms.assetid: 75c6b9b6-955b-49bd-9bc8-ced88b496a1f --- # Compiler Error C3713 -'method': an event handler method must have the same function parameters as the source 'method' +> 'method': an event handler method must have the same function parameters as the source 'method' + +## Remarks You defined an event handler method that did not use the same parameters as the source event method. To fix this error, give the event handler method the same parameters as those of the source event method. -The following sample generates C3713: +## Example + +The following example generates C3713: ```cpp // C3713.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3714.md b/docs/error-messages/compiler-errors-2/compiler-error-c3714.md index 2f230ab406..a623be6a03 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3714.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3714.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3714" title: "Compiler Error C3714" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3714" +ms.date: 11/04/2016 f1_keywords: ["C3714"] helpviewer_keywords: ["C3714"] -ms.assetid: 17718f75-5a37-4e42-912b-487e91008a95 --- # Compiler Error C3714 -'method': an event handler method must have the same calling convention as the source 'method' +> 'method': an event handler method must have the same calling convention as the source 'method' + +## Remarks You defined an event handler method that did not use the same calling convention as the source event method. To fix this error, give the event handler method the same calling conventions as those of the source event method. For example, in the code below, make the calling conventions of `handler1` and `event1` match ([__cdecl](../../cpp/cdecl.md) or [__stdcall](../../cpp/stdcall.md) or others). Removing calling convention keywords from both declarations will also solve the problem, and cause `event1` and `handler1` to default to the [thiscall](../../cpp/thiscall.md) calling convention. See [Calling Conventions](../../cpp/calling-conventions.md) for more information. -The following sample generates C3714: +## Example + +The following example generates C3714: ```cpp // C3714.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3715.md b/docs/error-messages/compiler-errors-2/compiler-error-c3715.md index 3357231814..807db400d6 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3715.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3715.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Error C3715" title: "Compiler Error C3715" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3715" +ms.date: 11/04/2016 f1_keywords: ["C3715"] helpviewer_keywords: ["C3715"] -ms.assetid: ee5dce88-ddc4-4bdb-9464-47467ce1674f --- # Compiler Error C3715 -'pointer': must be a pointer to 'class' +> 'pointer': must be a pointer to 'class' + +## Remarks You specified a pointer in [`__hook`](../../cpp/hook.md) or [`__unhook`](../../cpp/unhook.md) that did not point to a valid class. To fix this error, ensure that your **`__hook`** and **`__unhook`** calls specify pointers to valid classes. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3717.md b/docs/error-messages/compiler-errors-2/compiler-error-c3717.md index 6aead02f76..26f54ec56c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3717.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3717.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3717" title: "Compiler Error C3717" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3717" +ms.date: 11/04/2016 f1_keywords: ["C3717"] helpviewer_keywords: ["C3717"] -ms.assetid: ae4fceb1-2583-4577-b2f1-40971a017055 --- # Compiler Error C3717 -'method': a method that fires events cannot be defined +> 'method': a method that fires events cannot be defined + +## Remarks You declared an event method that includes an implementation. An [__event](../../cpp/event.md) method declaration cannot have a definition. To fix this error, ensure that no event method declarations have definitions. For example, in the code below, remove the function body from the `event1` declaration as indicated by the comments. -The following sample generates C3717: +## Example + +The following example generates C3717: ```cpp // C3717.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3718.md b/docs/error-messages/compiler-errors-2/compiler-error-c3718.md index ad3cb13008..63b08e810f 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3718.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3718.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3718" title: "Compiler Error C3718" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3718" +ms.date: 11/04/2016 f1_keywords: ["C3718"] helpviewer_keywords: ["C3718"] -ms.assetid: 346b5205-c44d-49d3-b66a-96417d3d6986 --- # Compiler Error C3718 > can only call '*event*' in the context of a member function of the receiving class +## Remarks + The event can only be called from the receiving class. ## Example -The following sample generates C3718: +The following example generates C3718: ```cpp // C3718.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3719.md b/docs/error-messages/compiler-errors-2/compiler-error-c3719.md index 777a99eaba..7dad0a67d1 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3719.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3719.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3719" title: "Compiler Error C3719" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3719" +ms.date: 11/04/2016 f1_keywords: ["C3719"] helpviewer_keywords: ["C3719"] -ms.assetid: d0d59d4e-babb-4480-9ef7-70cf1a28165c --- # Compiler Error C3719 -'interface': an interface based event source can only be used for COM events +> 'interface': an interface based event source can only be used for COM events + +## Remarks You declared an interface in a non-COM context. -The following sample generates C3719: +## Example + +The following example generates C3719: ```cpp // C3719a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3721.md b/docs/error-messages/compiler-errors-2/compiler-error-c3721.md index fbfee81eae..9b2aa843ac 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3721.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3721.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3721" title: "Compiler Error C3721" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3721" +ms.date: 11/04/2016 f1_keywords: ["C3721"] helpviewer_keywords: ["C3721"] -ms.assetid: c696ca38-3e00-4875-abbe-7bce0f46930e --- # Compiler Error C3721 -'signature': incompatible signature for event +> 'signature': incompatible signature for event + +## Remarks An event was declared incorrectly. For more information, see [__event](../../cpp/event.md). diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3722.md b/docs/error-messages/compiler-errors-2/compiler-error-c3722.md index c526c8d892..e852c92d29 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3722.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3722.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3722" title: "Compiler Error C3722" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3722" +ms.date: 11/04/2016 f1_keywords: ["C3722"] helpviewer_keywords: ["C3722"] -ms.assetid: 3cb28363-5eff-4548-bd0d-d5c615846353 --- # Compiler Error C3722 -a generic event is not allowed +> a generic event is not allowed + +## Remarks The compiler only allows generic classes, structs, and functions. For more information, see [Generics](../../extensions/generics-cpp-component-extensions.md). -The following sample generates C3722: +## Example + +The following example generates C3722: ```cpp // C3722.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3723.md b/docs/error-messages/compiler-errors-2/compiler-error-c3723.md index 1723435e04..c40274a831 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3723.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3723.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3723" title: "Compiler Error C3723" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3723" +ms.date: 11/04/2016 f1_keywords: ["C3723"] helpviewer_keywords: ["C3723"] -ms.assetid: ef0fb1ff-3f9a-4093-a6b6-894d1ab0c4b9 --- # Compiler Error C3723 > 'function': could not resolve event +## Remarks + `function` could not resolve which event to call. -The following sample generates C3723: +## Examples + +The following example generates C3723: ```cpp // C3723.cpp @@ -37,7 +40,7 @@ int main() { **`__hook`** and **`__unhook`** are not compatible with **`/clr`** programming. Use the += and -= operators instead. -The following sample generates C3723: +The following example generates C3723: ```cpp // C3723b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3724.md b/docs/error-messages/compiler-errors-2/compiler-error-c3724.md index 227b770bdc..78cc2f268c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3724.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3724.md @@ -1,17 +1,22 @@ --- -description: "Learn more about: Compiler Error C3724" title: "Compiler Error C3724" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3724" +ms.date: 11/04/2016 f1_keywords: ["C3724"] helpviewer_keywords: ["C3724"] -ms.assetid: cab8aba7-14fc-406f-8cc6-32744c8f31c1 --- # Compiler Error C3724 -must #include \ to use multi-threading with events +> must #include \ to use multi-threading with events + +## Remarks The windows.h file is required if you use multi-threading with events. To fix this error, add `#include ` to the top of the file in which event sources and event receivers are defined. +## Example + +The following example generates C3724: + ```cpp // C3724.cpp // uncomment the following line to resolve diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3727.md b/docs/error-messages/compiler-errors-2/compiler-error-c3727.md index 9bd6172470..a431ad71bc 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3727.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3727.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Error C3727" title: "Compiler Error C3727" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3727" +ms.date: 11/04/2016 f1_keywords: ["C3727"] helpviewer_keywords: ["C3727"] -ms.assetid: 17b9fe7b-ee9e-483f-9c27-1f709255a9e0 --- # Compiler Error C3727 -'event': a managed event must be a member function or a data member that is a pointer to a delegate +> 'event': a managed event must be a member function or a data member that is a pointer to a delegate + +## Remarks .NET events must be a pointer to a delegate type. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3728.md b/docs/error-messages/compiler-errors-2/compiler-error-c3728.md index a99650d999..a67b6d6b90 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3728.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3728.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3728" title: "Compiler Error C3728" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3728" +ms.date: 11/04/2016 f1_keywords: ["C3728"] helpviewer_keywords: ["C3728"] -ms.assetid: 6b510cb1-887f-4fcd-9a1f-3bb720417ed1 --- # Compiler Error C3728 -'event': event does not have a raise method +> 'event': event does not have a raise method + +## Remarks Metadata created with a language, such as C#, that does not allow an event to be raised from outside the class in which it was defined, was included with the [#using](../../preprocessor/hash-using-directive-cpp.md) directive, and a Visual C++ program using CLR programming attempted to raise the event. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3731.md b/docs/error-messages/compiler-errors-2/compiler-error-c3731.md index 3336cfa957..7b8d9f51f0 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3731.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3731.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3731" title: "Compiler Error C3731" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3731" +ms.date: 11/04/2016 f1_keywords: ["C3731"] helpviewer_keywords: ["C3731"] -ms.assetid: 45f89fcd-464c-4bc8-8a42-edcb5416d26c --- # Compiler Error C3731 -incompatible event 'function1' and handler 'function2'; event source and event handler must be the same type +> incompatible event 'function1' and handler 'function2'; event source and event handler must be the same type + +## Remarks The event source and event receiver must have the same type (for example `native` vs. `com` types). To fix this error, make the types of the event source and the event handler match. -The following sample generates C3731: +## Example + +The following example generates C3731: ```cpp // C3731.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3732.md b/docs/error-messages/compiler-errors-2/compiler-error-c3732.md index 5b02bbd1e2..b8a783b4e7 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3732.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3732.md @@ -1,17 +1,20 @@ --- -description: "Learn more about: Compiler Error C3732" title: "Compiler Error C3732" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3732" +ms.date: 11/04/2016 f1_keywords: ["C3732"] helpviewer_keywords: ["C3732"] -ms.assetid: 2d55a7e1-9c39-4379-a093-2f7beb27e2ca --- # Compiler Error C3732 -'interface': a custom interface that fires COM events cannot inherit from IDispatch +> 'interface': a custom interface that fires COM events cannot inherit from IDispatch + +## Remarks An interface that supports COM events cannot inherit from `IDispatch`. For more information, see [Event Handling in COM](../../cpp/event-handling-in-com.md). +## Example + The following error generates C3732: ```cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3733.md b/docs/error-messages/compiler-errors-2/compiler-error-c3733.md index b1d20b40c5..e5fdcabd78 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3733.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3733.md @@ -7,11 +7,15 @@ helpviewer_keywords: ["C3733"] --- # Compiler Error C3733 -'event': improper syntax for specifying a COM event; did you forget '__interface'? +> 'event': improper syntax for specifying a COM event; did you forget '__interface'? + +## Remarks The wrong syntax was used for a COM event. To fix this error, change the event type or correct the syntax to comply with the COM event rules. -The following sample generates C3733: +## Example + +The following example generates C3733: ```cpp #define _ATL_ATTRIBUTES 1 diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3734.md b/docs/error-messages/compiler-errors-2/compiler-error-c3734.md index e324edba41..3b4e562450 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3734.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3734.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3734" title: "Compiler Error C3734" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3734" +ms.date: 11/04/2016 f1_keywords: ["C3734"] helpviewer_keywords: ["C3734"] -ms.assetid: 4e2afdcc-7da9-45a1-9c96-85f25e2986e8 --- # Compiler Error C3734 -'class': a managed or WinRT class cannot be a coclass +> 'class': a managed or WinRT class cannot be a coclass + +## Remarks The [coclass](../../windows/attributes/coclass.md) attribute cannot be used with managed or WinRT classes. -The following sample generates C3734 and shows how to fix it: +## Example + +The following example generates C3734 and shows how to fix it: ```cpp // C3734.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3736.md b/docs/error-messages/compiler-errors-2/compiler-error-c3736.md index fcd2b8d333..e95ba8acaf 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3736.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3736.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3736" title: "Compiler Error C3736" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3736" +ms.date: 11/04/2016 f1_keywords: ["C3736"] helpviewer_keywords: ["C3736"] -ms.assetid: 579b773c-41e7-40ea-8382-2e3ce2667f4c --- # Compiler Error C3736 -'event': must be a method or, in the case of managed events, optionally a data member +> 'event': must be a method or, in the case of managed events, optionally a data member + +## Remarks Native and COM events must be methods. .NET events can also be data members. -The following sample generates C3736: +## Example + +The following example generates C3736: ```cpp // C3736.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3737.md b/docs/error-messages/compiler-errors-2/compiler-error-c3737.md index b6b4efa9ff..1ca3f1a46c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3737.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3737.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3737" title: "Compiler Error C3737" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3737" +ms.date: 11/04/2016 f1_keywords: ["C3737"] helpviewer_keywords: ["C3737"] -ms.assetid: ca2aeb23-2491-4ccb-8838-884abf7065c8 --- # Compiler Error C3737 -'delegate': a delegate may not have an explicit calling convention +> 'delegate': a delegate may not have an explicit calling convention + +## Remarks You cannot specify the [calling convention](../../cpp/calling-conventions.md) for a **`delegate`**. ## Example -The following sample generates C3737: +The following example generates C3737: ```cpp // C3737a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3738.md b/docs/error-messages/compiler-errors-2/compiler-error-c3738.md index 319585c518..d31a1c9b75 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3738.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3738.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3738" title: "Compiler Error C3738" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3738" +ms.date: 11/04/2016 f1_keywords: ["C3738"] helpviewer_keywords: ["C3738"] -ms.assetid: dd3ee011-e204-4264-bf3a-da32c4ef7038 --- # Compiler Error C3738 -'calling_convention': the calling convention of the explicit instantiation must match that of the template being instantiated +> 'calling_convention': the calling convention of the explicit instantiation must match that of the template being instantiated + +## Remarks It is recommended that you do not specify a calling convention on an explicit instantiation. If you must, though, the calling conventions must match. ## Example -The following sample generates C3738. +The following example generates C3738. ```cpp // C3738.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3739.md b/docs/error-messages/compiler-errors-2/compiler-error-c3739.md index 88b29cba22..f666f3bdc4 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3739.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3739.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3739" title: "Compiler Error C3739" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3739" +ms.date: 11/04/2016 f1_keywords: ["C3739"] helpviewer_keywords: ["C3739"] -ms.assetid: acffe894-08b8-4bf2-9249-9501e6e2bad3 --- # Compiler Error C3739 -'class': syntax is only supported when the 'layout_dependent' parameter of event_receiver is true +> 'class': syntax is only supported when the 'layout_dependent' parameter of event_receiver is true + +## Remarks You tried to hook an entire interface of events but `layout_dependent` on [event_receiver](../../windows/attributes/event-receiver.md) attribute is not true; you must hook a single event at a time. -The following sample generates C3739: +## Example + +The following example generates C3739: ```cpp // C3739.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3740.md b/docs/error-messages/compiler-errors-2/compiler-error-c3740.md index a660236cdf..b71adc946a 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3740.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3740.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3740" title: "Compiler Error C3740" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3740" +ms.date: 11/04/2016 f1_keywords: ["C3740"] helpviewer_keywords: ["C3740"] -ms.assetid: edb17a90-2307-4df6-943d-580460d26d2b --- # Compiler Error C3740 -templates cannot source or receive events +> templates cannot source or receive events + +## Remarks A templated class or struct cannot contain [events](../../cpp/event-handling.md). -The following sample generates C3740: +## Example + +The following example generates C3740: ```cpp // C3740.cpp