diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3661.md b/docs/error-messages/compiler-errors-2/compiler-error-c3661.md index 8f0e21753b..7429b9de5a 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3661.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3661.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3661" title: "Compiler Error C3661" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3661" +ms.date: 11/04/2016 f1_keywords: ["C3661"] helpviewer_keywords: ["C3661"] -ms.assetid: 50793fd1-1829-4b29-ad0d-094ef2068b43 --- # Compiler Error C3661 -explicit override list did not find any methods to override +> explicit override list did not find any methods to override + +## Remarks An explicit override specified one or more type names. However, there was no function with the necessary signature in the type(s) that matched the overriding function's signature. If you attempt to override based on type name, there must be one or more virtual functions in the specified type(s) that match the signature of the overriding function. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3662.md b/docs/error-messages/compiler-errors-2/compiler-error-c3662.md index 6ba37b2405..e5edfda336 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3662.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3662.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3662" title: "Compiler Error C3662" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3662" +ms.date: 11/04/2016 f1_keywords: ["C3662"] helpviewer_keywords: ["C3662"] -ms.assetid: 61bd3e41-a86b-42c0-be89-d992d3906ff1 --- # Compiler Error C3662 -'member' : override specifier 'specifier' only allowed on member functions of managed or WinRT classes +> 'member' : override specifier 'specifier' only allowed on member functions of managed or WinRT classes + +## Remarks An override specifier was used on a member of native type, which is not allowed. @@ -16,7 +17,7 @@ For more information, see [Explicit Overrides](../../extensions/explicit-overrid ## Example -The following sample generates C3662. +The following example generates C3662. ```cpp // C3662.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3665.md b/docs/error-messages/compiler-errors-2/compiler-error-c3665.md index 936a2255bf..969f276e9c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3665.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3665.md @@ -1,20 +1,23 @@ --- -description: "Learn more about: Compiler Error C3665" title: "Compiler Error C3665" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3665" +ms.date: 11/04/2016 f1_keywords: ["C3665"] helpviewer_keywords: ["C3665"] -ms.assetid: 893bb47e-8de1-43aa-af7d-fa47ad149ee9 --- # Compiler Error C3665 -'destructor' : override specifier 'keyword' not allowed on a destructor/finalizer +> 'destructor' : override specifier 'keyword' not allowed on a destructor/finalizer + +## Remarks A keyword was used that is not allowed on a destructor or finalizer. For example, a new slot cannot be requested on a destructor or finalizer. For more information, see [Explicit Overrides](../../extensions/explicit-overrides-cpp-component-extensions.md) and [Destructors and finalizers](../../dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md#BKMK_Destructors_and_finalizers). -The following sample generates C3665: +## Example + +The following example generates C3665: ```cpp // C3665.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3666.md b/docs/error-messages/compiler-errors-2/compiler-error-c3666.md index c2aa130de7..b516ef7214 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3666.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3666.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3666" title: "Compiler Error C3666" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3666" +ms.date: 11/04/2016 f1_keywords: ["C3666"] helpviewer_keywords: ["C3666"] -ms.assetid: 459e51dd-cefb-4346-99b3-644f2d8b65b2 --- # Compiler Error C3666 -'constructor' : override specifier 'keyword' not allowed on a constructor +> 'constructor' : override specifier 'keyword' not allowed on a constructor + +## Remarks An override specifier was used on a constructor, and that is not allowed. For more information, see [Override Specifiers](../../extensions/override-specifiers-cpp-component-extensions.md). ## Example -The following sample generates C3666. +The following example generates C3666. ```cpp // C3666.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3668.md b/docs/error-messages/compiler-errors-2/compiler-error-c3668.md index 079daf488b..e8640f0b6b 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3668.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3668.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3668" title: "Compiler Error C3668" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3668" +ms.date: 11/04/2016 f1_keywords: ["C3668"] helpviewer_keywords: ["C3668"] -ms.assetid: 53a96698-bde4-4447-95b5-b5108291f60c --- # Compiler Error C3668 -'method' : method with override specifier 'override' did not override any base class methods +> 'method' : method with override specifier 'override' did not override any base class methods + +## Remarks A function attempted to override a non-existent function. @@ -16,7 +17,7 @@ For more information, see [Explicit Overrides](../../extensions/explicit-overrid ## Example -The following sample generates C3668. +The following example generates C3668. ```cpp // C3668.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3669.md b/docs/error-messages/compiler-errors-2/compiler-error-c3669.md index 4b1fcf6229..c4e896e88f 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3669.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3669.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3669" title: "Compiler Error C3669" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3669" +ms.date: 11/04/2016 f1_keywords: ["C3669"] helpviewer_keywords: ["C3669"] -ms.assetid: be9c7ae4-e96f-47ab-922a-39a3537d5ca6 --- # Compiler Error C3669 -'member' : override specifier 'override' not allowed on static member functions or constructors +> 'member' : override specifier 'override' not allowed on static member functions or constructors + +## Remarks An override was specified incorrectly. For more information, see [Explicit Overrides](../../extensions/explicit-overrides-cpp-component-extensions.md). ## Example -The following sample generates C3669. +The following example generates C3669. ```cpp // C3669.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3670.md b/docs/error-messages/compiler-errors-2/compiler-error-c3670.md index 6c0d1e1786..7db7a7f9bc 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3670.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3670.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3670" title: "Compiler Error C3670" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3670" +ms.date: 11/04/2016 f1_keywords: ["C3670"] helpviewer_keywords: ["C3670"] -ms.assetid: d0fa9c6e-8f90-48c7-9066-31b4fa5942eb --- # Compiler Error C3670 -'override' : cannot override inaccessible base class method 'method' +> 'override' : cannot override inaccessible base class method 'method' + +## Remarks An override can only take place on a function whose access level makes it available in a derived type. For more information, see [Explicit Overrides](../../extensions/explicit-overrides-cpp-component-extensions.md). -The following sample generates C3670: +## Example + +The following example generates C3670: ```cpp // C3670.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3671.md b/docs/error-messages/compiler-errors-2/compiler-error-c3671.md index 8a310719b5..81d0cefecf 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3671.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3671.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3671" title: "Compiler Error C3671" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3671" +ms.date: 11/04/2016 f1_keywords: ["C3671"] helpviewer_keywords: ["C3671"] -ms.assetid: d684e4ae-87e2-4424-80bb-6f346652c831 --- # Compiler Error C3671 -'function_1' : function does not override 'function_2' +> 'function_1' : function does not override 'function_2' + +## Remarks When using explicit override syntax, the compiler generates an error if a function is not overridden. See [Explicit Overrides](../../extensions/explicit-overrides-cpp-component-extensions.md) for more information. ## Example -The following sample generates C3671. +The following example generates C3671. ```cpp // C3671.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3672.md b/docs/error-messages/compiler-errors-2/compiler-error-c3672.md index d217e41c36..6a01378955 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3672.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3672.md @@ -7,13 +7,15 @@ helpviewer_keywords: ["C3672"] --- # Compiler Error C3672 -pseudo-destructor expression can only be used as part of a function call +> pseudo-destructor expression can only be used as part of a function call + +## Remarks A destructor was called incorrectly. For more information, see [Destructors](../../cpp/destructors-cpp.md). ## Example -The following sample generates C3672. +The following example generates C3672. ```cpp // C3672.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3673.md b/docs/error-messages/compiler-errors-2/compiler-error-c3673.md index 80458100b7..5781848d70 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3673.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3673.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3673" title: "Compiler Error C3673" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3673" +ms.date: 11/04/2016 f1_keywords: ["C3673"] helpviewer_keywords: ["C3673"] -ms.assetid: bb6d2079-05af-4e2c-be0e-75c892e6c590 --- # Compiler Error C3673 -'type' : class does not have a copy-constructor +> 'type' : class does not have a copy-constructor + +## Remarks A user-defined constructor is needed to copy objects of CLR ref types. For more information, see [C++ Stack Semantics for Reference Types](../../dotnet/cpp-stack-semantics-for-reference-types.md). ## Examples -The following sample generates C3673. +The following example generates C3673. ```cpp // C3673.cpp @@ -32,7 +33,7 @@ int main() { } ``` -The following sample generates C3673. +The following example generates C3673. ```cpp // C3673_b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3675.md b/docs/error-messages/compiler-errors-2/compiler-error-c3675.md index 8ef0cbf41f..437cd7bb1a 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3675.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3675.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3675" title: "Compiler Error C3675" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3675" +ms.date: 11/04/2016 f1_keywords: ["C3675"] helpviewer_keywords: ["C3675"] -ms.assetid: 87461613-6633-430b-b95d-c7cb1bb63776 --- # Compiler Error C3675 -'function' : is reserved because 'property' is defined +> 'function' : is reserved because 'property' is defined + +## Remarks When you declare a simple property, the compiler generates the get and set accessor methods, and those names are present in the scope of your program. The compiler-generated names are formed by prepending get_ and set_ to the property name. Therefore, you cannot declare functions with the same name as the compiler-generated accessors. @@ -16,7 +17,7 @@ See [property](../../extensions/property-cpp-component-extensions.md) for more i ## Example -The following sample generates C3675. +The following example generates C3675. ```cpp // C3675.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3697.md b/docs/error-messages/compiler-errors-2/compiler-error-c3697.md index aa3cb7f339..dbb5120276 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3697.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3697.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3697" title: "Compiler Error C3697" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3697" +ms.date: 11/04/2016 f1_keywords: ["C3697"] helpviewer_keywords: ["C3697"] -ms.assetid: 2d3f63c4-b7f8-421d-a7a5-2bf17fd054f9 --- # Compiler Error C3697 -'qualifier' : cannot use this qualifier on '^' +> 'qualifier' : cannot use this qualifier on '^' + +## Remarks The tracking handle (^) was applied to a qualifier for which it was not designed. -The following sample generates C3697: +## Example + +The following example generates C3697: ```cpp // C3697.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3698.md b/docs/error-messages/compiler-errors-2/compiler-error-c3698.md index f3be544eda..76dac5ebdc 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3698.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3698.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3698" title: "Compiler Error C3698" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3698" +ms.date: 11/04/2016 f1_keywords: ["C3698"] helpviewer_keywords: ["C3698"] -ms.assetid: 3c02fb08-7ba4-4637-a06f-19926cb2b5f1 --- # Compiler Error C3698 -'type' : cannot use this type as argument of 'operator' +> 'type' : cannot use this type as argument of 'operator' + +## Remarks A managed object was declared incorrectly. -The following sample generates C3698: +## Example + +The following example generates C3698: ```cpp // C3698.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3699.md b/docs/error-messages/compiler-errors-2/compiler-error-c3699.md index 98d2020bbf..962b767cd4 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3699.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3699.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3699" title: "Compiler Error C3699" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3699" +ms.date: 11/04/2016 f1_keywords: ["C3699"] helpviewer_keywords: ["C3699"] -ms.assetid: 47c29afc-ab8b-4238-adfe-788dd6e00b3b --- # Compiler Error C3699 -'operator' : cannot use this indirection on type 'type' +> 'operator' : cannot use this indirection on type 'type' + +## Remarks An attempt was made to use indirection that is not allowed on `type`. ## Examples -The following sample generates C3699. +The following example generates C3699. ```cpp // C3699.cpp @@ -27,7 +28,7 @@ int main() { } ``` -A trivial property cannot have reference type. See [property](../../extensions/property-cpp-component-extensions.md) for more information. The following sample generates C3699. +A trivial property cannot have reference type. See [property](../../extensions/property-cpp-component-extensions.md) for more information. The following example generates C3699. ```cpp // C3699_b.cpp @@ -38,7 +39,7 @@ ref struct C { }; ``` -The equivalent of a "pointer to a pointer" syntax is a handle to a tracking reference. The following sample generates C3699. +The equivalent of a "pointer to a pointer" syntax is a handle to a tracking reference. The following example generates C3699. ```cpp // C3699_c.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3701.md b/docs/error-messages/compiler-errors-2/compiler-error-c3701.md index 5ddae9dc5c..4194641c39 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3701.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3701.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3701" title: "Compiler Error C3701" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3701" +ms.date: 11/04/2016 f1_keywords: ["C3701"] helpviewer_keywords: ["C3701"] -ms.assetid: a7faaa87-d2f5-4d6a-9a2f-5cab2d24a648 --- # Compiler Error C3701 -'function' : event_source has no events +> 'function' : event_source has no events + +## Remarks You attempted to use [event_source](../../windows/attributes/event-source.md) on a class that has no event methods. To fix this error, add one or more events to the class. -The following sample generates C3701: +## Example + +The following example generates C3701: ```cpp // C3701.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3702.md b/docs/error-messages/compiler-errors-2/compiler-error-c3702.md index c405d39324..8c101ecfb7 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3702.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3702.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3702" title: "Compiler Error C3702" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3702" +ms.date: 11/04/2016 f1_keywords: ["C3702"] helpviewer_keywords: ["C3702"] -ms.assetid: 14fcc20e-4404-45d7-be54-e4f09332fa5a --- # Compiler Error C3702 -'function' : ATL is required for COM events +> 'function' : ATL is required for COM events + +## Remarks You attempted to use COM events without including the necessary ATL header files. -The following sample generates C3702: +## Example + +The following example generates C3702: ```cpp // C3702.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3703.md b/docs/error-messages/compiler-errors-2/compiler-error-c3703.md index 674971f02c..3061a7f300 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3703.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3703.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3703" title: "Compiler Error C3703" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3703" +ms.date: 11/04/2016 f1_keywords: ["C3703"] helpviewer_keywords: ["C3703"] -ms.assetid: 7e3677d9-f2be-4c26-998f-423564e9023c --- # Compiler Error C3703 -'event handler': an event handler method must have the same storage class as the source 'event' +> 'event handler': an event handler method must have the same storage class as the source 'event' + +## Remarks An [event](../../cpp/event-handling.md) has a different storage class than the event handler to which it is hooked. For example, this error occurs if the event handler is a static member function and the event is not static. To fix this error, give the event and the event handler the same storage class. -The following sample generates C3703: +## Example + +The following example generates C3703: ```cpp // C3703.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3704.md b/docs/error-messages/compiler-errors-2/compiler-error-c3704.md index 619885fc8a..7b218f8522 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3704.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3704.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3704" title: "Compiler Error C3704" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3704" +ms.date: 11/04/2016 f1_keywords: ["C3704"] helpviewer_keywords: ["C3704"] -ms.assetid: ee40ea35-a214-4dec-9489-d7f155dd0ac2 --- # Compiler Error C3704 -'function' : a vararg method cannot fire events +> 'function' : a vararg method cannot fire events + +## Remarks + +You attempted to use [__event](../../cpp/event.md) on a vararg method. To fix this error, replace the `fireEvent(int i, ...)` call with the `fireEvent(int i)` call as shown in the following code example. -You attempted to use [__event](../../cpp/event.md) on a vararg method. To fix this error, replace the `fireEvent(int i, ...)` call with the `fireEvent(int i)` call as shown in the following code sample. +## Example -The following sample generates C3704: +The following example generates C3704: ```cpp // C3704.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3705.md b/docs/error-messages/compiler-errors-2/compiler-error-c3705.md index d0aafaf4e3..7408c25582 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3705.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3705.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3705" title: "Compiler Error C3705" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3705" +ms.date: 11/04/2016 f1_keywords: ["C3705"] helpviewer_keywords: ["C3705"] -ms.assetid: 8361017d-5782-4214-a9d7-e9825fd29bc8 --- # Compiler Error C3705 -'function' : cannot find eventing interface +> 'function' : cannot find eventing interface + +## Remarks + +You must define an event interface to use COM events. Note that the `#include` lines of the ATL header files shown in the example below are required for using COM events. To fix this error, uncomment the definition of the `IEvents` interface in the example code. -You must define an event interface to use COM events. Note that the `#include` lines of the ATL header files shown in the sample below are required for using COM events. To fix this error, uncomment the definition of the `IEvents` interface in the sample code. +## Example -The following sample generates C3705: +The following example generates C3705: ```cpp // C3705.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3706.md b/docs/error-messages/compiler-errors-2/compiler-error-c3706.md index 82e34020d0..3a64b43295 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3706.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3706.md @@ -1,22 +1,25 @@ --- -description: "Learn more about: Compiler Error C3706" title: "Compiler Error C3706" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3706" +ms.date: 11/04/2016 f1_keywords: ["C3706"] helpviewer_keywords: ["C3706"] -ms.assetid: d20a33eb-d625-46c5-ac87-32075a590d07 --- # Compiler Error C3706 -'function' : must be a COM interface to fire COM events +> 'function' : must be a COM interface to fire COM events + +## Remarks The event interface that you use to fire COM events must be a COM interface. In this situation, the interface should either be defined using a Visual C++ attribute, or imported using [#import](../../preprocessor/hash-import-directive-cpp.md) from a type library with #import's embedded_idl attribute. -Note that the `#include` lines of the ATL header files shown in the sample below are required for using COM events. To fix this error, make `IEvents` (the eventing interface) a COM interface by applying one of the following attributes to the interface definition: [object](../../windows/attributes/object-cpp.md), [dual](../../windows/attributes/dual.md), or [dispinterface](../../windows/attributes/dispinterface.md). +Note that the `#include` lines of the ATL header files shown in the example below are required for using COM events. To fix this error, make `IEvents` (the eventing interface) a COM interface by applying one of the following attributes to the interface definition: [object](../../windows/attributes/object-cpp.md), [dual](../../windows/attributes/dual.md), or [dispinterface](../../windows/attributes/dispinterface.md). If an interface is from a header file generated by MIDL, the compiler will not recognize it as a COM interface. -The following sample generates C3706: +## Example + +The following example generates C3706: ```cpp // C3706.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3707.md b/docs/error-messages/compiler-errors-2/compiler-error-c3707.md index 66e76dcccb..1d3d66e45f 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3707.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3707.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3707" title: "Compiler Error C3707" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3707" +ms.date: 11/04/2016 f1_keywords: ["C3707"] helpviewer_keywords: ["C3707"] -ms.assetid: ac63a5dd-7a4b-48d2-9f2a-be9cb090134c --- # Compiler Error C3707 -'function' : dispinterface method must have a dispid +> 'function' : dispinterface method must have a dispid + +## Remarks + +If you use a `dispinterface` method, you must assign it a `dispid`. To fix this error, assign a `dispid` to the `dispinterface` method, for example, by uncommenting the `id` attribute on the method in the example below. For more information, see the attributes [dispinterface](../../windows/attributes/dispinterface.md) and [id](../../windows/attributes/id.md). -If you use a `dispinterface` method, you must assign it a `dispid`. To fix this error, assign a `dispid` to the `dispinterface` method, for example, by uncommenting the `id` attribute on the method in the sample below. For more information, see the attributes [dispinterface](../../windows/attributes/dispinterface.md) and [id](../../windows/attributes/id.md). +## Example -The following sample generates C3707: +The following example generates C3707: ```cpp // C3707.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3708.md b/docs/error-messages/compiler-errors-2/compiler-error-c3708.md index 4d171cc1b6..a611b94ccf 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3708.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3708.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3708" title: "Compiler Error C3708" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3708" +ms.date: 11/04/2016 f1_keywords: ["C3708"] helpviewer_keywords: ["C3708"] -ms.assetid: 45e71564-9c7f-437f-98d8-a735ce162ed0 --- # Compiler Error C3708 -'interface': improper use of 'keyword'; must be a member of a compatible event source +> 'interface': improper use of 'keyword'; must be a member of a compatible event source + +## Remarks To declare an interface as an event, the event declaration must be in an event source. -The following sample generates C3708: +## Example + +The following example generates C3708: ```cpp // C3708.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3709.md b/docs/error-messages/compiler-errors-2/compiler-error-c3709.md index c357f96034..9c0750d1cc 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3709.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3709.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3709" title: "Compiler Error C3709" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3709" +ms.date: 11/04/2016 f1_keywords: ["C3709"] helpviewer_keywords: ["C3709"] -ms.assetid: d5576b04-2f93-420a-8f3e-8b8e987e8dab --- # Compiler Error C3709 -'function': improper syntax for specifying event in __hook/\__unhook +> 'function': improper syntax for specifying event in __hook/\__unhook + +## Remarks When you specify an event source with [__hook](../../cpp/hook.md) or [__unhook](../../cpp/unhook.md), the first parameter must be a valid event method and the second parameter must be a valid event source object (not a method). -The following sample generates C3709: +## Example + +The following example generates C3709: ```cpp // C3709.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3710.md b/docs/error-messages/compiler-errors-2/compiler-error-c3710.md index a3e0b13c6c..7616ac9a94 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3710.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3710.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3710" title: "Compiler Error C3710" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3710" +ms.date: 11/04/2016 f1_keywords: ["C3710"] helpviewer_keywords: ["C3710"] -ms.assetid: 18bec009-5b6f-464a-a21e-5d58a6936504 --- # Compiler Error C3710 -'function': improper syntax for specifying event handler in __hook/\__unhook +> 'function': improper syntax for specifying event handler in __hook/\__unhook + +## Remarks When you specify an event handler with [__hook](../../cpp/hook.md) or [__unhook](../../cpp/unhook.md), the handler must be a valid method. ## Example -The following sample generates C3710 +The following example generates C3710 ```cpp // C3710.cpp