Skip to content

Commit 6a07aa0

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C3161, C3190]
1 parent e8176e8 commit 6a07aa0

21 files changed

+68
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 1fe2be85-a343-487b-8476-bf9e257eb29d
1010

1111
> 'interface' : nesting class, struct, union or interface in an interface is illegal; nesting interface in a class, struct or union is illegal
1212
13+
## Remarks
14+
1315
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.
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 0d4c4a24-1456-4191-b7d8-c38cb7b17c32
1010

1111
> 'type' : a reference type which has a destructor cannot be used as the type of static data member 'member'
1212
13+
## Remarks
14+
1315
The common language runtime cannot know when to run a user-defined destructor when the class also contains static member function.
1416

1517
A destructor will never be run unless the object is deleted explicitly.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 17dcafa3-f416-4e04-a232-f9569218ba75
1010

1111
> '*construct*': attributes inconsistent with previous declaration
1212
13+
## Remarks
14+
1315
The attribute(s) that are applied to a definition conflict with the attribute(s) that are applied to a declaration.
1416

1517
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.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: ec3e330d-c15d-4158-8268-09101486c566
1010

1111
> 'pointer' : cannot declare a pointer to an interior __gc pointer as a member of 'type'
1212
13+
## Remarks
14+
1315
The compiler found an invalid pointer declaration (a **`__nogc`** pointer to a **`__gc`** pointer.).
1416

1517
C3166 is only reachable using the obsolete compiler option **`/clr:oldSyntax`**.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 58c25fe7-8562-4a18-ad3f-487f081ff173
1010

1111
> Unable to initialize .NET Framework: make sure it is installed
1212
13+
## Remarks
14+
1315
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 4c36fcfb-c351-48ff-b4eb-78d2aa1b4d55
1010

1111
> 'type' : illegal underlying type for enum
1212
13+
## Remarks
14+
1315
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.
1416

17+
## Example
18+
1519
The following sample generates C3168:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ ms.assetid: ca9a59d6-7df3-42f0-b028-c09d0af3ac2a
1010

1111
> cannot have different module identifiers in a project
1212
13+
## Remarks
14+
1315
[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.
1416

1517
Identical `module` attributes can be specified in more than one source code file.
1618

19+
## Example
20+
1721
For example, if the following module attributes were found:
1822

1923
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ ms.assetid: 1ce26997-7ef1-4c9f-84da-003ea1a4251e
1010

1111
> 'module': cannot specify different module attributes in a project
1212
13+
## Remarks
14+
1315
[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.
1416

1517
Identical `module` attributes can be specified in more than one source code file.
1618

19+
## Example
20+
1721
For example, if the following `module` attributes were found:
1822

1923
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ ms.assetid: 1834e2fd-6036-4c33-aff2-b51bc7c99441
1010

1111
> 'module_name': cannot specify different idl_module attributes in a project
1212
13+
## Remarks
14+
1315
[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.
1416

1517
Identical `idl_module` attributes can be specified in more than one source code file.
1618

19+
## Example
20+
1721
For example, if the following `idl_module` attributes were found:
1822

1923
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: edf79e10-e8cf-4f76-8d33-ab9d05e974e9
1010

1111
> version mismatch in idl merge
1212
13+
## Remarks
14+
1315
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.
1416

1517
Update your Visual C++ installation so that all tools are from the latest released version.

0 commit comments

Comments
 (0)