diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3803.md b/docs/error-messages/compiler-errors-2/compiler-error-c3803.md index af817ec77d..367696019e 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3803.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3803.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3803" title: "Compiler Error C3803" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3803" +ms.date: 11/04/2016 f1_keywords: ["C3803"] helpviewer_keywords: ["C3803"] -ms.assetid: bad5fb9a-ed9a-4c15-96e7-cf06e200a50d --- # Compiler Error C3803 -'property': property has a type that is incompatible with one of its accessors 'accessor' +> 'property': property has a type that is incompatible with one of its accessors 'accessor' + +## Remarks The type of a property defined with [property](../../cpp/property-cpp.md) does not match the return type for one of its accessor functions. -The following sample generates C3803: +## Example + +The following example generates C3803: ```cpp // C3803.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3804.md b/docs/error-messages/compiler-errors-2/compiler-error-c3804.md index 78038af3c8..243706cab9 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3804.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3804.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3804" title: "Compiler Error C3804" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3804" +ms.date: 11/04/2016 f1_keywords: ["C3804"] helpviewer_keywords: ["C3804"] -ms.assetid: 7c4cda28-ec96-4d04-937b-36dbd9944722 --- # Compiler Error C3804 -'property_accessor': the accessor methods for a property must either be all static or all non-static +> 'property_accessor': the accessor methods for a property must either be all static or all non-static + +## Remarks When defining a non-trivial property, the accessor functions can be either static or instance, but not both. @@ -16,7 +17,7 @@ See [property](../../extensions/property-cpp-component-extensions.md) for more i ## Example -The following sample generates C3804. +The following example generates C3804. ```cpp // C3804.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3805.md b/docs/error-messages/compiler-errors-2/compiler-error-c3805.md index 405f04301e..b889e2d7e7 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3805.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3805.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Error C3805" title: "Compiler Error C3805" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3805" +ms.date: 11/04/2016 f1_keywords: ["C3805"] helpviewer_keywords: ["C3805"] -ms.assetid: 166bbc35-5488-46b4-8e4c-9cd26ee5644e --- # Compiler Error C3805 -'token' : unexpected token, expected either '}' or an identifier +> 'token' : unexpected token, expected either '}' or an identifier + +## Remarks When defining a property, an invalid token was encountered. Remove the invalid token. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3807.md b/docs/error-messages/compiler-errors-2/compiler-error-c3807.md index 836ea5b2fe..c951650c6d 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3807.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3807.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3807" title: "Compiler Error C3807" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3807" +ms.date: 11/04/2016 f1_keywords: ["C3807"] helpviewer_keywords: ["C3807"] -ms.assetid: 7e2b0aab-8c61-4e71-b9c1-fcaeb6a1b5ea --- # Compiler Error C3807 -'type' : a class with the ComImport attribute cannot derive from 'type2', only interface implementation is allowed +> 'type' : a class with the ComImport attribute cannot derive from 'type2', only interface implementation is allowed + +## Remarks A type that derived from can only implement an interface. ## Example -The following sample generates C3807. +The following example generates C3807. ```cpp // C3807.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3808.md b/docs/error-messages/compiler-errors-2/compiler-error-c3808.md index 33e19c9ba8..d55d364f37 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3808.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3808.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C3808" title: "Compiler Error C3808" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3808" +ms.date: 11/04/2016 f1_keywords: ["C3808"] helpviewer_keywords: ["C3808"] -ms.assetid: 2ee8ac97-3ea4-417a-8710-be73a7f98cf4 --- # Compiler Error C3808 @@ -18,7 +17,7 @@ The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual St ## Example -The following sample generates C3808. +The following example generates C3808. ```cpp // C3808.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3809.md b/docs/error-messages/compiler-errors-2/compiler-error-c3809.md index 33561ee925..90fdd8856a 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3809.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3809.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3809" title: "Compiler Error C3809" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3809" +ms.date: 11/04/2016 f1_keywords: ["C3809"] helpviewer_keywords: ["C3809"] -ms.assetid: 37eca584-c20c-464e-8e45-a987214b7ce4 --- # Compiler Error C3809 -'class' : a managed or WinRT type cannot have any friend functions/classes/interfaces +> 'class' : a managed or WinRT type cannot have any friend functions/classes/interfaces + +## Remarks Managed types and Windows Runtime types do not allow friends. To fix this error, do not declare friends inside managed or Windows Runtime types. -The following sample generates C3809: +## Example + +The following example generates C3809: ```cpp // C3809a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3812.md b/docs/error-messages/compiler-errors-2/compiler-error-c3812.md index 01948fe082..b2618d099b 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3812.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3812.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3812" title: "Compiler Error C3812" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3812" +ms.date: 11/04/2016 f1_keywords: ["C3812"] helpviewer_keywords: ["C3812"] -ms.assetid: 326ac706-9a5f-4851-b9d2-b90c64c75532 --- # Compiler Error C3812 -'property' must be the first token in a property declaration +> 'property' must be the first token in a property declaration + +## Remarks When declaring a property, the `__property` keyword must be the first token on the line. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3813.md b/docs/error-messages/compiler-errors-2/compiler-error-c3813.md index 191a711ea7..4f384bab29 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3813.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3813.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3813" title: "Compiler Error C3813" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3813" +ms.date: 11/04/2016 f1_keywords: ["C3813"] helpviewer_keywords: ["C3813"] -ms.assetid: ffdbc489-71bf-4cd6-988c-f824c9ab3ceb --- # Compiler Error C3813 -a property declaration can only appear within the definition of a managed or WinRT type +> a property declaration can only appear within the definition of a managed or WinRT type + +## Remarks A [property](../../dotnet/how-to-use-properties-in-cpp-cli.md) can only be declared within a managed or Windows Runtime type. Native types do not support the **`property`** keyword. ## Example -The following sample generates C3813 and shows how to fix it: +The following example generates C3813 and shows how to fix it: ```cpp // C3813.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3815.md b/docs/error-messages/compiler-errors-2/compiler-error-c3815.md index 5ba2bf28ee..b60ddbf7dd 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3815.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3815.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3815" title: "Compiler Error C3815" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3815" +ms.date: 11/04/2016 f1_keywords: ["C3815"] helpviewer_keywords: ["C3815"] -ms.assetid: c5a3b404-6341-4fd3-92af-152b404c4dde --- # Compiler Error C3815 -return type of method 'get_accessor' must match type of the last parameter of a setter +> return type of method 'get_accessor' must match type of the last parameter of a setter + +## Remarks When declaring properties, the return value of the `get_accessor` method must match the last parameter in the declaration of the set accessor method. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3816.md b/docs/error-messages/compiler-errors-2/compiler-error-c3816.md index 555ed517ec..e489ee5545 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3816.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3816.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3816" title: "Compiler Error C3816" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3816" +ms.date: 11/04/2016 f1_keywords: ["C3816"] helpviewer_keywords: ["C3816"] -ms.assetid: 2e52cc7f-e31c-41a3-8d6f-9f5fab3648c0 --- # Compiler Error C3816 -'declaration' was previously declared or defined with a different managed or WinRTmodifier +> 'declaration' was previously declared or defined with a different managed or WinRTmodifier + +## Remarks A forward declaration and an actual declaration require that there be no conflicts or inconsistencies in the declaration of attributes. -The following sample generates C3816 and shows how to fix it: +## Example + +The following example generates C3816 and shows how to fix it: ```cpp // C3816a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3817.md b/docs/error-messages/compiler-errors-2/compiler-error-c3817.md index 763d7fecb8..2485dc8edf 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3817.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3817.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3817" title: "Compiler Error C3817" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3817" +ms.date: 11/04/2016 f1_keywords: ["C3817"] helpviewer_keywords: ["C3817"] -ms.assetid: c6dbb57a-c65e-4040-8dd2-85bd9d4fd337 --- # Compiler Error C3817 -'declaration' : property can only be applied to a function +> 'declaration' : property can only be applied to a function + +## Remarks The **`property`** keyword can only be a applied to a function definition. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3818.md b/docs/error-messages/compiler-errors-2/compiler-error-c3818.md index e89b0f982b..142477f675 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3818.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3818.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3818" title: "Compiler Error C3818" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3818" +ms.date: 11/04/2016 f1_keywords: ["C3818"] helpviewer_keywords: ["C3818"] -ms.assetid: f9502f6a-0690-4135-ab88-cc97cf490f5c --- # Compiler Error C3818 -array property declaration 'property1' shall not overload an index property 'property2' +> array property declaration 'property1' shall not overload an index property 'property2' + +## Remarks An overload is not possible for properties when one is an indexer and the other is an array property. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3820.md b/docs/error-messages/compiler-errors-2/compiler-error-c3820.md index f9398c914e..31f296f9bc 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3820.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3820.md @@ -4,7 +4,6 @@ description: "Microsoft C/C++ compiler error C3820 causes and remedies." ms.date: 09/26/2020 f1_keywords: ["C3820"] helpviewer_keywords: ["C3820"] -ms.assetid: 98638838-068f-4a62-b8d5-1068368a0ff1 --- # Compiler Error C3820 diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3821.md b/docs/error-messages/compiler-errors-2/compiler-error-c3821.md index 40b92e5f15..408630cab8 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3821.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3821.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3821" title: "Compiler Error C3821" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3821" +ms.date: 11/04/2016 f1_keywords: ["C3821"] helpviewer_keywords: ["C3821"] -ms.assetid: 2b327c7a-5faf-443c-ae82-944fae25b4df --- # Compiler Error C3821 -'function': managed type or function cannot be used in an unmanaged function +> 'function': managed type or function cannot be used in an unmanaged function + +## Remarks Functions with inline assembly or [setjmp](../../c-runtime-library/reference/setjmp.md) cannot contain value types or managed classes. To fix this error, remove the inline assembly and `setjmp` or remove the managed objects. @@ -16,7 +17,7 @@ C3821 can also occur if you try to use automatic storage in a vararg function. ## Examples -The following sample generates C3821. +The following example generates C3821. ```cpp // C3821a.cpp @@ -27,7 +28,7 @@ void test1(...) { } ``` -The following sample generates C3821. +The following example generates C3821. ```cpp // C3821b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3824.md b/docs/error-messages/compiler-errors-2/compiler-error-c3824.md index 9287340b19..37daec6fad 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3824.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3824.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3824" title: "Compiler Error C3824" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3824" +ms.date: 11/04/2016 f1_keywords: ["C3824"] helpviewer_keywords: ["C3824"] -ms.assetid: b6c6adf1-0a29-401c-a06e-616fd50d4c37 --- # Compiler Error C3824 -'member': this type cannot appear in this context (function parameter, return type, or a static member) +> 'member': this type cannot appear in this context (function parameter, return type, or a static member) + +## Remarks Pinning pointers cannot be function parameters, return types, or declared **`static`**. ## Example -The following sample generates C3824: +The following example generates C3824: ```cpp // C3824a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3825.md b/docs/error-messages/compiler-errors-2/compiler-error-c3825.md index 9b05b9a696..40293c4ae5 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3825.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3825.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3825" title: "Compiler Error C3825" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3825" +ms.date: 11/04/2016 f1_keywords: ["C3825"] helpviewer_keywords: ["C3825"] -ms.assetid: 18e204a1-f26e-42c6-8d74-2b49cc95f940 --- # Compiler Error C3825 -'class': a managed or WinRTclass can only support managed or WinRTevents +> 'class': a managed or WinRTclass can only support managed or WinRTevents + +## Remarks Only .NET events are supported in managed classes. Only Windows Runtime events are supported in Windows Runtime classes. To fix this error in managed code, change type parameter of `event_source` and `event_receiver` from `native` to `managed`. Alternatively, remove the attribute. ## Example -The following sample generates C3825 and shows how to fix it: +The following example generates C3825 and shows how to fix it: ```cpp // C3825a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3828.md b/docs/error-messages/compiler-errors-2/compiler-error-c3828.md index 4250711326..9fe4e6f010 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3828.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3828.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3828" title: "Compiler Error C3828" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3828" +ms.date: 11/04/2016 f1_keywords: ["C3828"] helpviewer_keywords: ["C3828"] -ms.assetid: 8d9cee75-9504-4bc8-88b6-2413618a3f45 --- # Compiler Error C3828 -'object type': placement arguments not allowed while creating instances of managed or WinRTclasses +> 'object type': placement arguments not allowed while creating instances of managed or WinRTclasses + +## Remarks When creating an object of a managed type or Windows Runtime type, you cannot use the placement form of operator [ref new, gcnew](../../extensions/ref-new-gcnew-cpp-component-extensions.md) or [new](../../cpp/new-operator-cpp.md). -The following sample generates C3828 and shows how to fix it: +## Example + +The following example generates C3828 and shows how to fix it: ```cpp // C3828a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3830.md b/docs/error-messages/compiler-errors-2/compiler-error-c3830.md index 8ea57b4157..cbcf477597 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3830.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3830.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3830" title: "Compiler Error C3830" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3830" +ms.date: 11/04/2016 f1_keywords: ["C3830"] helpviewer_keywords: ["C3830"] -ms.assetid: c9798f88-5001-4067-9fb1-09957ddc6fa8 --- # Compiler Error C3830 -'type1': cannot inherit from 'type2', value types can only inherit from interface classes +> 'type1': cannot inherit from 'type2', value types can only inherit from interface classes + +## Remarks A value type cannot inherit a base class. For more information, see [Classes and Structs](../../extensions/classes-and-structs-cpp-component-extensions.md). ## Example -The following sample generates C3830: +The following example generates C3830: ```cpp // C3830a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3831.md b/docs/error-messages/compiler-errors-2/compiler-error-c3831.md index 60e02f58a6..2b86198494 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3831.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3831.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3831" title: "Compiler Error C3831" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3831" +ms.date: 11/04/2016 f1_keywords: ["C3831"] helpviewer_keywords: ["C3831"] -ms.assetid: a125d8dc-b75a-4ea0-b6c7-fe7b119dba25 --- # Compiler Error C3831 -'member': 'class' cannot have a pinned data member or a member function returning a pinning pointer +> 'member': 'class' cannot have a pinned data member or a member function returning a pinning pointer + +## Remarks [pin_ptr (C++/CLI)](../../extensions/pin-ptr-cpp-cli.md) was used incorrectly. ## Example -The following sample generates C3831: +The following example generates C3831: ```cpp // C3831a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3832.md b/docs/error-messages/compiler-errors-2/compiler-error-c3832.md index caeebc3ea9..e1e3bdfaa4 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3832.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3832.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Error C3832" title: "Compiler Error C3832" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3832" +ms.date: 11/04/2016 f1_keywords: ["C3832"] helpviewer_keywords: ["C3832"] -ms.assetid: 9a41df82-42e1-4908-958c-76cff9235de0 --- # Compiler Error C3832 -'type library': type library looks as if it was built for 32-bit pointers; please change the 'ptrsize' qualifier +> 'type library': type library looks as if it was built for 32-bit pointers; please change the 'ptrsize' qualifier + +## Remarks Explicit information supplied with the `ptrsize` attribute of the [#import](../../preprocessor/hash-import-directive-cpp.md) directive did not agree with what the compiler found in the type library. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3833.md b/docs/error-messages/compiler-errors-2/compiler-error-c3833.md index a57735b84a..b129c53c0a 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3833.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3833.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3833" title: "Compiler Error C3833" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3833" +ms.date: 11/04/2016 f1_keywords: ["C3833"] helpviewer_keywords: ["C3833"] -ms.assetid: 8152be53-e01e-48cd-9eef-9de38723664c --- # Compiler Error C3833 -'type' : invalid target type for pointer_type +> 'type' : invalid target type for pointer_type + +## Remarks An [interior_ptr](../../extensions/interior-ptr-cpp-cli.md) or [pin_ptr](../../extensions/pin-ptr-cpp-cli.md) was declared incorrectly. -The following sample generates C3833: +## Examples + +The following example generates C3833: ```cpp // C3833.cpp @@ -34,7 +37,7 @@ int main() { } ``` -The following sample generates C3833: +The following example generates C3833: ```cpp // C3833b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3834.md b/docs/error-messages/compiler-errors-2/compiler-error-c3834.md index 957ff8062b..f20bfc9b04 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3834.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3834.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3834" title: "Compiler Error C3834" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3834" +ms.date: 11/04/2016 f1_keywords: ["C3834"] helpviewer_keywords: ["C3834"] -ms.assetid: 059e0dc4-300b-4e74-b6c2-41a57831fe2a --- # Compiler Error C3834 -illegal explicit cast to a pinning pointer; use a pinned local variable instead +> illegal explicit cast to a pinning pointer; use a pinned local variable instead + +## Remarks Explicit casts to a pinned pointer are not allowed. ## Example -The following sample generates C3834. +The following example generates C3834. ```cpp // C3834.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3836.md b/docs/error-messages/compiler-errors-2/compiler-error-c3836.md index d033952fdc..47bcc280d8 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3836.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3836.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3836" title: "Compiler Error C3836" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3836" +ms.date: 11/04/2016 f1_keywords: ["C3836"] helpviewer_keywords: ["C3836"] -ms.assetid: 254f851b-7b7d-4c34-a740-fcf72f6a636a --- # Compiler Error C3836 -static constructor is not allowed to have a member initializer list +> static constructor is not allowed to have a member initializer list + +## Remarks A managed class cannot have a static constructor that also has a member initialization list. Static class constructors are called by the common language runtime to do class initialization, initializing static data members. ## Example -The following sample generates C3836: +The following example generates C3836: ```cpp // C3836a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3838.md b/docs/error-messages/compiler-errors-2/compiler-error-c3838.md index 88b0263bba..10518be7bf 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3838.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3838.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3838" title: "Compiler Error C3838" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3838" +ms.date: 11/04/2016 f1_keywords: ["C3838"] helpviewer_keywords: ["C3838"] -ms.assetid: d6f470c2-131a-4a8c-843a-254acd43da83 --- # Compiler Error C3838 -cannot explicitly inherit from 'type' +> cannot explicitly inherit from 'type' + +## Remarks The specified `type` cannot act as a base class in any class. ## Example -The following sample generates C3838: +The following example generates C3838: ```cpp // C3838a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3839.md b/docs/error-messages/compiler-errors-2/compiler-error-c3839.md index 0979234a14..6cc03dfe85 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3839.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3839.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3839" title: "Compiler Error C3839" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3839" +ms.date: 11/04/2016 f1_keywords: ["C3839"] helpviewer_keywords: ["C3839"] -ms.assetid: 0957faff-1e9f-439b-876b-85bd8d2c578d --- # Compiler Error C3839 -cannot change alignment in a managed or WinRT type +> cannot change alignment in a managed or WinRT type + +## Remarks Alignment of variables in managed or Windows Runtime types is controlled by the CLR or Windows Runtime and cannot be modified with [align](../../cpp/align-cpp.md). -The following sample generates C3839: +## Example + +The following example generates C3839: ```cpp // C3839a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3842.md b/docs/error-messages/compiler-errors-2/compiler-error-c3842.md index 283392fcc7..5149f7f4d1 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3842.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3842.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3842" title: "Compiler Error C3842" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3842" +ms.date: 11/04/2016 f1_keywords: ["C3842"] helpviewer_keywords: ["C3842"] -ms.assetid: 41a1a44a-c618-40a2-8d26-7da27d14095d --- # Compiler Error C3842 -'function': 'const' and 'volatile' qualifiers on member functions of WinRT or managed types are not supported +> 'function': 'const' and 'volatile' qualifiers on member functions of WinRT or managed types are not supported + +## Remarks [const](../../cpp/const-cpp.md) and [volatile](../../cpp/volatile-cpp.md) are not supported on member functions of Windows Runtime or managed types. -The following sample generates C3842: +## Example + +The following example generates C3842: ```cpp // C3842a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3846.md b/docs/error-messages/compiler-errors-2/compiler-error-c3846.md index 8196ca04b3..4a9caf6f2d 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3846.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3846.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3846" title: "Compiler Error C3846" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3846" +ms.date: 11/04/2016 f1_keywords: ["C3846"] helpviewer_keywords: ["C3846"] -ms.assetid: c470f8a5-106b-4efb-b8dc-e1319e04130f --- # Compiler Error C3846 -'symbol' : cannot import symbol from 'assembly2': as 'symbol' has already been imported from another assembly 'assembly1' +> 'symbol' : cannot import symbol from 'assembly2': as 'symbol' has already been imported from another assembly 'assembly1' + +## Remarks A symbol could not be imported from a referenced assembly because it was previously imported from a referenced assembly. ## Example -The following sample generates C3846: +The following example generates C3846: ```cpp // C3846a.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3848.md b/docs/error-messages/compiler-errors-2/compiler-error-c3848.md index c67ffd0065..f9bd3b6ac8 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3848.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3848.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3848" title: "Compiler Error C3848" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3848" +ms.date: 11/04/2016 f1_keywords: ["C3848"] helpviewer_keywords: ["C3848"] -ms.assetid: 32d3ccef-01ec-4f8b-bbff-fb9b1a76b4c4 --- # Compiler Error C3848 -expression having type 'type' would lose some const-volatile qualifiers in order to call 'function' +> expression having type 'type' would lose some const-volatile qualifiers in order to call 'function' + +## Remarks A variable with a specified const-volatile type can only call member functions defined with same or greater const-volatile qualifications. -The following samples generate C3848: +## Example + +The following example generate C3848: ```cpp // C3848.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3849.md b/docs/error-messages/compiler-errors-2/compiler-error-c3849.md index 2945bd37e2..923c5269c4 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3849.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3849.md @@ -1,20 +1,23 @@ --- -description: "Learn more about: Compiler Error C3849" title: "Compiler Error C3849" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3849" +ms.date: 11/04/2016 f1_keywords: ["C3849"] helpviewer_keywords: ["C3849"] -ms.assetid: 5347140e-1a81-4841-98c0-b63d98264b64 --- # Compiler Error C3849 -function-style call on an expression of type 'type' would lose const and/or volatile qualifiers for all number available operator overloads +> function-style call on an expression of type 'type' would lose const and/or volatile qualifiers for all number available operator overloads + +## Remarks A variable with a specified const-volatile type can only call member functions defined with same or greater const-volatile qualifications. To fix this error, provide an appropriate member function. You cannot execute a conversion on a const or volatile qualified object when the conversion causes loss of qualification. You can gain qualifiers but you cannot lose qualifiers in a conversion. -The following samples generate C3849: +## Example + +The following example generate C3849: ```cpp // C3849.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3850.md b/docs/error-messages/compiler-errors-2/compiler-error-c3850.md index e5add0470c..e5ae957dc8 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3850.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3850.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C3850" title: "Compiler Error C3850" -ms.date: "09/05/2018" +description: "Learn more about: Compiler Error C3850" +ms.date: 09/05/2018 f1_keywords: ["C3850"] helpviewer_keywords: ["C3850"] -ms.assetid: 028f3a37-f3ad-4ebc-9168-3cdea47524d4 --- # Compiler Error C3850 @@ -20,7 +19,7 @@ In code compiled as C++, a universal character name may use any valid Unicode co ## Example -The following sample generates C3850, and shows how to fix it: +The following example generates C3850, and shows how to fix it: ```cpp // C3850.cpp