diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3131.md b/docs/error-messages/compiler-errors-2/compiler-error-c3131.md index 54a1b28c50..6206cebbdf 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3131.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3131.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3131" title: "Compiler Error C3131" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3131" +ms.date: 11/04/2016 f1_keywords: ["C3131"] helpviewer_keywords: ["C3131"] -ms.assetid: 38f20fac-83c9-4cd9-b7b5-74ca8f650ea6 --- # Compiler Error C3131 -project must have a 'module' attribute with a 'name' property +> project must have a 'module' attribute with a 'name' property + +## Remarks The [module](../../windows/attributes/module-cpp.md) attribute must have a name parameter. -The following sample generates C3131: +## Example + +The following example generates C3131: ```cpp // C3131.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3132.md b/docs/error-messages/compiler-errors-2/compiler-error-c3132.md index d61facc1aa..83bbc2fe18 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3132.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3132.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3132" title: "Compiler Error C3132" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3132" +ms.date: 11/04/2016 f1_keywords: ["C3132"] helpviewer_keywords: ["C3132"] -ms.assetid: d54a3d12-336a-4ed0-ad4e-43cddac33b5e --- # Compiler Error C3132 -'function-parameter' : parameter arrays can only be applied to a formal argument of type 'single-dimensional managed array' +> 'function-parameter' : parameter arrays can only be applied to a formal argument of type 'single-dimensional managed array' + +## Remarks The attribute was applied to a parameter that was not a single-dimension array. -The following sample generates C3132: +## Example + +The following example generates C3132: ```cpp // C3132.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3133.md b/docs/error-messages/compiler-errors-2/compiler-error-c3133.md index d26c091a66..cb73725364 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3133.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3133.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3133" title: "Compiler Error C3133" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3133" +ms.date: 11/04/2016 f1_keywords: ["C3133"] helpviewer_keywords: ["C3133"] -ms.assetid: 4a709405-b67b-4061-8a2a-19fa5fb34a2a --- # Compiler Error C3133 -Attributes cannot be applied to C++ varargs +> Attributes cannot be applied to C++ varargs + +## Remarks An attribute was applied incorrectly. Attributes can not be applied to an ellipsis representing variable arguments. @@ -16,7 +17,7 @@ For more information, see [User-Defined Attributes](../../extensions/user-define ## Example -The following sample generates C3133. +The following example generates C3133. ```cpp // C3133.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3134.md b/docs/error-messages/compiler-errors-2/compiler-error-c3134.md index f8e04a9e7b..ee6d5ab7c7 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3134.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3134.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3134" title: "Compiler Error C3134" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3134" +ms.date: 11/04/2016 f1_keywords: ["C3134"] helpviewer_keywords: ["C3134"] -ms.assetid: f887e4d2-7740-49e4-9972-7edceb8fa77b --- # Compiler Error C3134 -'value' : value of attribute argument 'attribute' does not have valid type 'type' +> 'value' : value of attribute argument 'attribute' does not have valid type 'type' + +## Remarks A syntax error was detected when a value was assigned to an attribute. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3135.md b/docs/error-messages/compiler-errors-2/compiler-error-c3135.md index 1b97325d54..9e421773ca 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3135.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3135.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Error C3135" title: "Compiler Error C3135" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3135" +ms.date: 11/04/2016 f1_keywords: ["C3135"] helpviewer_keywords: ["C3135"] -ms.assetid: e92ee007-5a26-47f4-8ef4-339f2d9528d1 --- # Compiler Error C3135 -'property' : a property cannot have a 'const' or 'volatile' type +> 'property' : a property cannot have a 'const' or 'volatile' type + +## Remarks The [const](../../cpp/const-cpp.md) and [volatile](../../cpp/volatile-cpp.md) keywords are not permitted on properties. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3136.md b/docs/error-messages/compiler-errors-2/compiler-error-c3136.md index d7f66d0434..6a3a0d24b4 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3136.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3136.md @@ -1,17 +1,20 @@ --- -description: "Learn more about: Compiler Error C3136" title: "Compiler Error C3136" -ms.date: "10/03/2018" +description: "Learn more about: Compiler Error C3136" +ms.date: 10/03/2018 f1_keywords: ["C3136"] helpviewer_keywords: ["C3136"] -ms.assetid: c77103cd-00f7-408e-b74b-4f8562039d31 --- # Compiler Error C3136 -'interface' : a COM interface can only inherit from another COM interface, 'interface' is not a COM interface +> 'interface' : a COM interface can only inherit from another COM interface, 'interface' is not a COM interface + +## Remarks An interface to which you applied an [interface attribute](../../windows/attributes/interface-attributes.md) inherits from an interface that is not a COM interface. A COM interface ultimately inherits from `IUnknown`. Any interface preceded by an interface attribute is a COM interface. +## Example + The following example generates C3136: ```cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3137.md b/docs/error-messages/compiler-errors-2/compiler-error-c3137.md index 1ac5395685..6e731bc706 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3137.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3137.md @@ -1,17 +1,20 @@ --- -description: "Learn more about: Compiler Error C3137" title: "Compiler Error C3137" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3137" +ms.date: 11/04/2016 f1_keywords: ["C3137"] helpviewer_keywords: ["C3137"] -ms.assetid: 70bb1313-2e87-43ed-a0d8-33fa6ff475e4 --- # Compiler Error C3137 -'property' : a property cannot be initialized +> 'property' : a property cannot be initialized + +## Remarks A property cannot be initialized, for example, in a constructor's initialization list. +## Example + The following example generates C3137: ```cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3138.md b/docs/error-messages/compiler-errors-2/compiler-error-c3138.md index d02f0ad8c5..d7f229b606 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3138.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3138.md @@ -1,17 +1,20 @@ --- -description: "Learn more about: Compiler Error C3138" title: "Compiler Error C3138" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3138" +ms.date: 11/04/2016 f1_keywords: ["C3138"] helpviewer_keywords: ["C3138"] -ms.assetid: 364ee9e8-9358-410e-bd35-9c4a226a3753 --- # Compiler Error C3138 -'interface' : a 'attribute' interface must inherit from IDispatch, or from an interface that inherits from IDispatch +> 'interface' : a 'attribute' interface must inherit from IDispatch, or from an interface that inherits from IDispatch + +## Remarks An interface with the [dual](../../windows/attributes/dual.md) or [dispinterface](../../windows/attributes/dispinterface.md) attributes does not have `IDispatch` as a direct or indirect base interface. +## Example + The following example generates C3138: ```cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3139.md b/docs/error-messages/compiler-errors-2/compiler-error-c3139.md index 7d5df2ca7a..2fd93ca549 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3139.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3139.md @@ -1,16 +1,21 @@ --- -description: "Learn more about: Compiler Error C3139" title: "Compiler Error C3139" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3139" +ms.date: 11/04/2016 f1_keywords: ["C3139"] helpviewer_keywords: ["C3139"] -ms.assetid: 95c92263-10ac-4ff3-b385-6312dd92adbc --- # Compiler Error C3139 -'struct' : cannot export a UDT without members +> 'struct' : cannot export a UDT without members + +## Remarks + +You attempted to apply the [export](../../windows/attributes/export.md) attribute to an empty UDT (user-defined type). + +## Example -You attempted to apply the [export](../../windows/attributes/export.md) attribute to an empty UDT (user-defined type). For example: +For example: ```cpp // C3139.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3140.md b/docs/error-messages/compiler-errors-2/compiler-error-c3140.md index 4339d3f6bd..6141df5550 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3140.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3140.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3140" title: "Compiler Error C3140" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3140" +ms.date: 11/04/2016 f1_keywords: ["C3140"] helpviewer_keywords: ["C3140"] -ms.assetid: 122f8943-fac3-4db8-a3a8-2c5d19233de6 --- # Compiler Error C3140 -cannot have multiple 'module' attributes in the same compilation unit +> cannot have multiple 'module' attributes in the same compilation unit + +## Remarks The [module](../../windows/attributes/module-cpp.md) attribute can only be defined once per project. -The following sample generates C3140: +## Example + +The following example generates C3140: ```cpp // C3140.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3141.md b/docs/error-messages/compiler-errors-2/compiler-error-c3141.md index 6811def6fc..a46f284709 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3141.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3141.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3141" title: "Compiler Error C3141" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3141" +ms.date: 11/04/2016 f1_keywords: ["C3141"] helpviewer_keywords: ["C3141"] -ms.assetid: b4fd65c3-50cc-46cd-8de0-6a6d24cb9cda --- # Compiler Error C3141 -'interface_name' : interfaces only support public inheritance +> 'interface_name' : interfaces only support public inheritance + +## Remarks Interfaces defined with the [interface (or __interface)](../../cpp/interface.md) keyword only support public inheritance. -The following sample generates C3141: +## Example + +The following example generates C3141: ```cpp // C3141.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3142.md b/docs/error-messages/compiler-errors-2/compiler-error-c3142.md index 0a7e12997f..ac7aaeb13d 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3142.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3142.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3142" title: "Compiler Error C3142" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3142" +ms.date: 11/04/2016 f1_keywords: ["C3142"] helpviewer_keywords: ["C3142"] -ms.assetid: 795137ad-d00a-4a9c-9665-0cd8bfb5da8b --- # Compiler Error C3142 -'property_name' : you cannot take the address of a property +> 'property_name' : you cannot take the address of a property + +## Remarks The address of a property is not available to the developer. -The following sample generates C3142: +## Example + +The following example generates C3142: ```cpp // C3142_2.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3145.md b/docs/error-messages/compiler-errors-2/compiler-error-c3145.md index 0105f33cfe..fad9fdabf3 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3145.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3145.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3145" title: "Compiler Error C3145" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3145" +ms.date: 11/04/2016 f1_keywords: ["C3145"] helpviewer_keywords: ["C3145"] -ms.assetid: f165c874-0f51-45c7-85e8-ebe321cbc168 --- # Compiler Error C3145 -'object' : global or static variable may not have managed or WinRT type 'type' +> 'object' : global or static variable may not have managed or WinRT type 'type' + +## Remarks You can only define CLR or WinRT objects within function scope. -The following sample generates C3145 and shows how to fix it: +## Examples + +The following example generates C3145 and shows how to fix it: ```cpp // C3145.cpp @@ -35,7 +38,7 @@ int main() { } ``` -The following sample generates C3145: +The following example generates C3145: ```cpp // C3145b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3149.md b/docs/error-messages/compiler-errors-2/compiler-error-c3149.md index d28f936604..241585d1b1 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3149.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3149.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3149" title: "Compiler Error C3149" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3149" +ms.date: 11/04/2016 f1_keywords: ["C3149"] helpviewer_keywords: ["C3149"] -ms.assetid: cf6e2616-2f06-46da-8a8a-d449cb481c51 --- # Compiler Error C3149 -'type' : cannot use this type here without a top-level 'char' +> 'type' : cannot use this type here without a top-level 'char' + +## Remarks A declaration was not specified correctly. @@ -16,7 +17,9 @@ For example, you may have defined a CLR type at global scope and tried to create To resolve this error, declare variables of CLR types inside a function or type definition. -The following sample generates C3149: +## Examples + +The following example generates C3149: ```cpp // C3149.cpp @@ -29,7 +32,7 @@ int main() { } ``` -The following sample generates C3149: +The following example generates C3149: ```cpp // C3149b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3150.md b/docs/error-messages/compiler-errors-2/compiler-error-c3150.md index 3145de7e12..2c26b49381 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3150.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3150.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3150" title: "Compiler Error C3150" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3150" +ms.date: 11/04/2016 f1_keywords: ["C3150"] helpviewer_keywords: ["C3150"] -ms.assetid: c1ff28f5-52fe-4fd4-81d0-2e0ad8548631 --- # Compiler Error C3150 -'element' : 'attribute' can only be applied to a class, interface, array or pointer +> 'element' : 'attribute' can only be applied to a class, interface, array or pointer + +## Remarks **`__gc`** can only be used on a class, interface, or array. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3152.md b/docs/error-messages/compiler-errors-2/compiler-error-c3152.md index 2208919a99..6372b7c33e 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3152.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3152.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3152" title: "Compiler Error C3152" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3152" +ms.date: 11/04/2016 f1_keywords: ["C3152"] helpviewer_keywords: ["C3152"] -ms.assetid: 4ee6e2cd-5d19-4b73-833d-765c35797e4b --- # Compiler Error C3152 -'construct' : 'keyword' can only be applied to a class, struct, or virtual member function +> 'construct' : 'keyword' can only be applied to a class, struct, or virtual member function + +## Remarks Certain keywords can only be applied to a C++ class. -The following sample generates C3152 and shows how to fix it: +## Example + +The following example generates C3152 and shows how to fix it: ```cpp // C3152.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3153.md b/docs/error-messages/compiler-errors-2/compiler-error-c3153.md index 5aacbbacaa..8f85face4c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3153.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3153.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3153" title: "Compiler Error C3153" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3153" +ms.date: 11/04/2016 f1_keywords: ["C3153"] helpviewer_keywords: ["C3153"] -ms.assetid: d775d97e-2480-484f-81f1-88406b10f947 --- # Compiler Error C3153 -'interface' : you cannot create an instance of an interface +> 'interface' : you cannot create an instance of an interface + +## Remarks An interface cannot be instantiated. To use the members of an interface, derive a class from the interface, implement the interface members, and then use the members. -The following sample generates C3153: +## Example + +The following example generates C3153: ```cpp // C3153.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3154.md b/docs/error-messages/compiler-errors-2/compiler-error-c3154.md index 1a22ee051b..6d9110b55c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3154.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3154.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3154" title: "Compiler Error C3154" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3154" +ms.date: 11/04/2016 f1_keywords: ["C3154"] helpviewer_keywords: ["C3154"] -ms.assetid: 78005c74-eaaf-4ac2-88ae-6c25d01a302a --- # Compiler Error C3154 -Expected ',' before ellipsis. Non-comma separated ellipsis not supported on parameter array functions. +> Expected ',' before ellipsis. Non-comma separated ellipsis not supported on parameter array functions. + +## Remarks A variable argument function was not declared correctly. @@ -16,7 +17,7 @@ For more information, see [Variable Argument Lists (...) (C++/CLI)](../../extens ## Example -The following sample generates C3154. +The following example generates C3154. ```cpp // C3154.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3155.md b/docs/error-messages/compiler-errors-2/compiler-error-c3155.md index 313c3c080a..8fadcc0c30 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3155.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3155.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3155" title: "Compiler Error C3155" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3155" +ms.date: 11/04/2016 f1_keywords: ["C3155"] helpviewer_keywords: ["C3155"] -ms.assetid: b04a42e1-64e7-40f8-81fe-c7945348b2cf --- # Compiler Error C3155 -attributes are not allowed in a property indexer +> attributes are not allowed in a property indexer + +## Remarks An indexed property was declared incorrectly. For more information, see [How to: Use Properties in C++/CLI](../../dotnet/how-to-use-properties-in-cpp-cli.md). ## Example -The following sample generates C3155. +The following example generates C3155. ```cpp // C3155.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3156.md b/docs/error-messages/compiler-errors-2/compiler-error-c3156.md index 6fdca14c85..8f70a06967 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3156.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3156.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3156" title: "Compiler Error C3156" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3156" +ms.date: 11/04/2016 f1_keywords: ["C3156"] helpviewer_keywords: ["C3156"] -ms.assetid: 1876da78-b94e-4af7-9795-28f72b209b3e --- # Compiler Error C3156 -'class' : you cannot have a local definition of a managed or WinRT type +> 'class' : you cannot have a local definition of a managed or WinRT type + +## Remarks A function cannot contain the definition, or declaration, of a managed or WinRT class, struct, or interface. ## Example -The following sample generates C3156. +The following example generates C3156. ```cpp // C3156.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3157.md b/docs/error-messages/compiler-errors-2/compiler-error-c3157.md index bc9741e607..445bf3ff9c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3157.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3157.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Error C3157" title: "Compiler Error C3157" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3157" +ms.date: 11/04/2016 f1_keywords: ["C3157"] helpviewer_keywords: ["C3157"] -ms.assetid: fe94d97f-612e-4729-8b2b-b057d84822a1 --- # Compiler Error C3157 -ParamArray attribute can only be applied to the last parameter +> ParamArray attribute can only be applied to the last parameter + +## Remarks The attribute was applied to the wrong parameter. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3159.md b/docs/error-messages/compiler-errors-2/compiler-error-c3159.md index 92cdaba9c6..c1090d08ec 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3159.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3159.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3159" title: "Compiler Error C3159" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3159" +ms.date: 11/04/2016 f1_keywords: ["C3159"] helpviewer_keywords: ["C3159"] -ms.assetid: e115cc76-0021-4568-95fd-61a324c41a85 --- # Compiler Error C3159 -'pointer' : array of pointers to value type cannot be declared +> 'pointer' : array of pointers to value type cannot be declared + +## Remarks An array of pointers to a value type cannot be declared. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3160.md b/docs/error-messages/compiler-errors-2/compiler-error-c3160.md index b28eace9bb..a509272d5a 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3160.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3160.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3160" title: "Compiler Error C3160" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3160" +ms.date: 11/04/2016 f1_keywords: ["C3160"] helpviewer_keywords: ["C3160"] -ms.assetid: a250c433-8adf-43b9-8dee-c3794e09b0a5 --- # Compiler Error C3160 -'pointer' : a data member of a managed or WinRT class cannot have this type +> 'pointer' : a data member of a managed or WinRT class cannot have this type + +## Remarks Interior garbage collection pointers may point to the interior of a managed or WinRT class. Because they are slower than whole-object pointers and require special handling by the garbage collector, you cannot declare interior managed pointers as members of a class. -The following sample generates C3160: +## Example + +The following example generates C3160: ```cpp // C3160.cpp