Skip to content

Commit 1e6f834

Browse files
Merge pull request #5664 from Rageking8/structure-error-references-in-range-c3131-c3160
Structure error references in range [C3131, C3160]
2 parents df83540 + c314fd6 commit 1e6f834

23 files changed

+162
-109
lines changed

docs/error-messages/compiler-errors-2/compiler-error-c3131.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3131"
32
title: "Compiler Error C3131"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3131"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3131"]
66
helpviewer_keywords: ["C3131"]
7-
ms.assetid: 38f20fac-83c9-4cd9-b7b5-74ca8f650ea6
87
---
98
# Compiler Error C3131
109

11-
project must have a 'module' attribute with a 'name' property
10+
> project must have a 'module' attribute with a 'name' property
11+
12+
## Remarks
1213

1314
The [module](../../windows/attributes/module-cpp.md) attribute must have a name parameter.
1415

15-
The following sample generates C3131:
16+
## Example
17+
18+
The following example generates C3131:
1619

1720
```cpp
1821
// C3131.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3132.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3132"
32
title: "Compiler Error C3132"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3132"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3132"]
66
helpviewer_keywords: ["C3132"]
7-
ms.assetid: d54a3d12-336a-4ed0-ad4e-43cddac33b5e
87
---
98
# Compiler Error C3132
109

11-
'function-parameter' : parameter arrays can only be applied to a formal argument of type 'single-dimensional managed array'
10+
> 'function-parameter' : parameter arrays can only be applied to a formal argument of type 'single-dimensional managed array'
11+
12+
## Remarks
1213

1314
The <xref:System.ParamArrayAttribute> attribute was applied to a parameter that was not a single-dimension array.
1415

15-
The following sample generates C3132:
16+
## Example
17+
18+
The following example generates C3132:
1619

1720
```cpp
1821
// C3132.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3133.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Error C3133"
32
title: "Compiler Error C3133"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3133"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3133"]
66
helpviewer_keywords: ["C3133"]
7-
ms.assetid: 4a709405-b67b-4061-8a2a-19fa5fb34a2a
87
---
98
# Compiler Error C3133
109

11-
Attributes cannot be applied to C++ varargs
10+
> Attributes cannot be applied to C++ varargs
11+
12+
## Remarks
1213

1314
An attribute was applied incorrectly. Attributes can not be applied to an ellipsis representing variable arguments.
1415

1516
For more information, see [User-Defined Attributes](../../extensions/user-defined-attributes-cpp-component-extensions.md).
1617

1718
## Example
1819

19-
The following sample generates C3133.
20+
The following example generates C3133.
2021

2122
```cpp
2223
// C3133.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3134.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Error C3134"
32
title: "Compiler Error C3134"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3134"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3134"]
66
helpviewer_keywords: ["C3134"]
7-
ms.assetid: f887e4d2-7740-49e4-9972-7edceb8fa77b
87
---
98
# Compiler Error C3134
109

11-
'value' : value of attribute argument 'attribute' does not have valid type 'type'
10+
> 'value' : value of attribute argument 'attribute' does not have valid type 'type'
11+
12+
## Remarks
1213

1314
A syntax error was detected when a value was assigned to an attribute.
1415

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Compiler Error C3135"
32
title: "Compiler Error C3135"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3135"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3135"]
66
helpviewer_keywords: ["C3135"]
7-
ms.assetid: e92ee007-5a26-47f4-8ef4-339f2d9528d1
87
---
98
# Compiler Error C3135
109

11-
'property' : a property cannot have a 'const' or 'volatile' type
10+
> 'property' : a property cannot have a 'const' or 'volatile' type
11+
12+
## Remarks
1213

1314
The [const](../../cpp/const-cpp.md) and [volatile](../../cpp/volatile-cpp.md) keywords are not permitted on properties.

docs/error-messages/compiler-errors-2/compiler-error-c3136.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
---
2-
description: "Learn more about: Compiler Error C3136"
32
title: "Compiler Error C3136"
4-
ms.date: "10/03/2018"
3+
description: "Learn more about: Compiler Error C3136"
4+
ms.date: 10/03/2018
55
f1_keywords: ["C3136"]
66
helpviewer_keywords: ["C3136"]
7-
ms.assetid: c77103cd-00f7-408e-b74b-4f8562039d31
87
---
98
# Compiler Error C3136
109

11-
'interface' : a COM interface can only inherit from another COM interface, 'interface' is not a COM interface
10+
> 'interface' : a COM interface can only inherit from another COM interface, 'interface' is not a COM interface
11+
12+
## Remarks
1213

1314
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.
1415

16+
## Example
17+
1518
The following example generates C3136:
1619

1720
```cpp

docs/error-messages/compiler-errors-2/compiler-error-c3137.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
---
2-
description: "Learn more about: Compiler Error C3137"
32
title: "Compiler Error C3137"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3137"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3137"]
66
helpviewer_keywords: ["C3137"]
7-
ms.assetid: 70bb1313-2e87-43ed-a0d8-33fa6ff475e4
87
---
98
# Compiler Error C3137
109

11-
'property' : a property cannot be initialized
10+
> 'property' : a property cannot be initialized
11+
12+
## Remarks
1213

1314
A property cannot be initialized, for example, in a constructor's initialization list.
1415

16+
## Example
17+
1518
The following example generates C3137:
1619

1720
```cpp

docs/error-messages/compiler-errors-2/compiler-error-c3138.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
---
2-
description: "Learn more about: Compiler Error C3138"
32
title: "Compiler Error C3138"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3138"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3138"]
66
helpviewer_keywords: ["C3138"]
7-
ms.assetid: 364ee9e8-9358-410e-bd35-9c4a226a3753
87
---
98
# Compiler Error C3138
109

11-
'interface' : a 'attribute' interface must inherit from IDispatch, or from an interface that inherits from IDispatch
10+
> 'interface' : a 'attribute' interface must inherit from IDispatch, or from an interface that inherits from IDispatch
11+
12+
## Remarks
1213

1314
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.
1415

16+
## Example
17+
1518
The following example generates C3138:
1619

1720
```cpp

docs/error-messages/compiler-errors-2/compiler-error-c3139.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3139"
32
title: "Compiler Error C3139"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3139"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3139"]
66
helpviewer_keywords: ["C3139"]
7-
ms.assetid: 95c92263-10ac-4ff3-b385-6312dd92adbc
87
---
98
# Compiler Error C3139
109

11-
'struct' : cannot export a UDT without members
10+
> 'struct' : cannot export a UDT without members
11+
12+
## Remarks
13+
14+
You attempted to apply the [export](../../windows/attributes/export.md) attribute to an empty UDT (user-defined type).
15+
16+
## Example
1217

13-
You attempted to apply the [export](../../windows/attributes/export.md) attribute to an empty UDT (user-defined type). For example:
18+
For example:
1419

1520
```cpp
1621
// C3139.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3140.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3140"
32
title: "Compiler Error C3140"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3140"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3140"]
66
helpviewer_keywords: ["C3140"]
7-
ms.assetid: 122f8943-fac3-4db8-a3a8-2c5d19233de6
87
---
98
# Compiler Error C3140
109

11-
cannot have multiple 'module' attributes in the same compilation unit
10+
> cannot have multiple 'module' attributes in the same compilation unit
11+
12+
## Remarks
1213

1314
The [module](../../windows/attributes/module-cpp.md) attribute can only be defined once per project.
1415

15-
The following sample generates C3140:
16+
## Example
17+
18+
The following example generates C3140:
1619

1720
```cpp
1821
// C3140.cpp

0 commit comments

Comments
 (0)