Skip to content

Commit c8bbd78

Browse files
Merge pull request #5666 from Rageking8/structure-error-references-in-range-c3161-c3190
Structure error references in range [C3161, C3190]
2 parents 1e6f834 + 16c1bb8 commit c8bbd78

21 files changed

+140
-92
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3161"
32
title: "Compiler Error C3161"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3161"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3161"]
66
helpviewer_keywords: ["C3161"]
7-
ms.assetid: 1fe2be85-a343-487b-8476-bf9e257eb29d
87
---
98
# Compiler Error C3161
109

11-
'interface' : nesting class, struct, union or interface in an interface is illegal; nesting interface in a class, struct or union is illegal
10+
> 'interface' : nesting class, struct, union or interface in an interface is illegal; nesting interface in a class, struct or union is illegal
11+
12+
## Remarks
1213

1314
An [__interface](../../cpp/interface.md) can only appear at global scope or within a namespace. A class, struct, or union cannot appear in an interface.
1415

1516
## Example
1617

17-
The following sample generates C3161.
18+
The following example generates C3161.
1819

1920
```cpp
2021
// C3161.cpp

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Error C3162"
32
title: "Compiler Error C3162"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3162"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3162"]
66
helpviewer_keywords: ["C3162"]
7-
ms.assetid: 0d4c4a24-1456-4191-b7d8-c38cb7b17c32
87
---
98
# Compiler Error C3162
109

11-
'type' : a reference type which has a destructor cannot be used as the type of static data member 'member'
10+
> 'type' : a reference type which has a destructor cannot be used as the type of static data member 'member'
11+
12+
## Remarks
1213

1314
The common language runtime cannot know when to run a user-defined destructor when the class also contains static member function.
1415

@@ -22,7 +23,7 @@ For more information, see,
2223

2324
## Example
2425

25-
The following sample generates C3162.
26+
The following example generates C3162.
2627

2728
```cpp
2829
// C3162.cpp

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
2-
description: "Learn more about: Compiler Error C3163"
32
title: "Compiler Error C3163"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3163"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3163"]
66
helpviewer_keywords: ["C3163"]
7-
ms.assetid: 17dcafa3-f416-4e04-a232-f9569218ba75
87
---
98
# Compiler Error C3163
109

1110
> '*construct*': attributes inconsistent with previous declaration
1211
12+
## Remarks
13+
1314
The attribute(s) that are applied to a definition conflict with the attribute(s) that are applied to a declaration.
1415

1516
One way to resolve C3163 is to eliminate attributes on the forward declaration. Any attributes on a forward declaration should be less than the attributes on the definition or, at most, equal to them.
@@ -18,7 +19,7 @@ A possible cause of the C3163 error involves the Microsoft source code annotatio
1819

1920
## Example
2021

21-
The following sample generates C3163.
22+
The following example generates C3163.
2223

2324
```cpp
2425
// C3163.cpp
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
2-
description: "Learn more about: Compiler Error C3166"
32
title: "Compiler Error C3166"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3166"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3166"]
66
helpviewer_keywords: ["C3166"]
7-
ms.assetid: ec3e330d-c15d-4158-8268-09101486c566
87
---
98
# Compiler Error C3166
109

1110
> 'pointer' : cannot declare a pointer to an interior __gc pointer as a member of 'type'
1211
12+
## Remarks
13+
1314
The compiler found an invalid pointer declaration (a **`__nogc`** pointer to a **`__gc`** pointer.).
1415

1516
C3166 is only reachable using the obsolete compiler option **`/clr:oldSyntax`**.
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 C3167"
32
title: "Compiler Error C3167"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3167"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3167"]
66
helpviewer_keywords: ["C3167"]
7-
ms.assetid: 58c25fe7-8562-4a18-ad3f-487f081ff173
87
---
98
# Compiler Error C3167
109

11-
Unable to initialize .NET Framework: make sure it is installed
10+
> Unable to initialize .NET Framework: make sure it is installed
11+
12+
## Remarks
1213

1314
The .NET Framework is not installed on this computer; install the .NET Framework.

docs/error-messages/compiler-errors-2/compiler-error-c3168.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 C3168"
32
title: "Compiler Error C3168"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3168"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3168"]
66
helpviewer_keywords: ["C3168"]
7-
ms.assetid: 4c36fcfb-c351-48ff-b4eb-78d2aa1b4d55
87
---
98
# Compiler Error C3168
109

11-
'type' : illegal underlying type for enum
10+
> 'type' : illegal underlying type for enum
11+
12+
## Remarks
1213

1314
The underlying type you specified for the **`enum`** type was not valid. The underlying type must be an integral C++ type or a corresponding CLR type.
1415

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

1720
```cpp
1821
// C3168.cpp

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Error C3170"
32
title: "Compiler Error C3170"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3170"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3170"]
66
helpviewer_keywords: ["C3170"]
7-
ms.assetid: ca9a59d6-7df3-42f0-b028-c09d0af3ac2a
87
---
98
# Compiler Error C3170
109

11-
cannot have different module identifiers in a project
10+
> cannot have different module identifiers in a project
11+
12+
## Remarks
1213

1314
[module](../../windows/attributes/module-cpp.md) attributes with different names were found in two of the files in a compilation. Only one unique `module` attribute can be specified per compilation.
1415

1516
Identical `module` attributes can be specified in more than one source code file.
1617

18+
## Example
19+
1720
For example, if the following module attributes were found:
1821

1922
```cpp

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Error C3171"
32
title: "Compiler Error C3171"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3171"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3171"]
66
helpviewer_keywords: ["C3171"]
7-
ms.assetid: 1ce26997-7ef1-4c9f-84da-003ea1a4251e
87
---
98
# Compiler Error C3171
109

11-
'module': cannot specify different module attributes in a project
10+
> 'module': cannot specify different module attributes in a project
11+
12+
## Remarks
1213

1314
[module](../../windows/attributes/module-cpp.md) attributes with different parameter lists were found in two of the files in a compilation. Only one unique `module` attribute can be specified per compilation.
1415

1516
Identical `module` attributes can be specified in more than one source code file.
1617

18+
## Example
19+
1720
For example, if the following `module` attributes were found:
1821

1922
```cpp

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Error C3172"
32
title: "Compiler Error C3172"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3172"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3172"]
66
helpviewer_keywords: ["C3172"]
7-
ms.assetid: 1834e2fd-6036-4c33-aff2-b51bc7c99441
87
---
98
# Compiler Error C3172
109

11-
'module_name': cannot specify different idl_module attributes in a project
10+
> 'module_name': cannot specify different idl_module attributes in a project
11+
12+
## Remarks
1213

1314
[idl_module](../../windows/attributes/idl-module.md) attributes with the same name but different `dllname` or `version` parameters were found in two of the files in a compilation. Only one unique `idl_module` attribute can be specified per compilation.
1415

1516
Identical `idl_module` attributes can be specified in more than one source code file.
1617

18+
## Example
19+
1720
For example, if the following `idl_module` attributes were found:
1821

1922
```cpp

docs/error-messages/compiler-errors-2/compiler-error-c3173.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 C3173"
32
title: "Compiler Error C3173"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3173"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3173"]
66
helpviewer_keywords: ["C3173"]
7-
ms.assetid: edf79e10-e8cf-4f76-8d33-ab9d05e974e9
87
---
98
# Compiler Error C3173
109

11-
version mismatch in idl merge
10+
> version mismatch in idl merge
11+
12+
## Remarks
1213

1314
This error occurs when an object file contains embedded idl that was generated with a previous version of the compiler. The compiler encodes a version number to ensure that the same compiler used to generate the idl content that is embedded in the .obj files is also the same compiler used to merge the embedded idl.
1415

0 commit comments

Comments
 (0)