Skip to content

Commit b93175a

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C2081, C2100]
1 parent 887af19 commit b93175a

19 files changed

+57
-1
lines changed

docs/error-messages/compiler-errors-1/compiler-error-c2081.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ ms.assetid: 7db9892d-364d-4178-a49d-f8398ece09a0
1010

1111
> 'identifier' : name in formal parameter list illegal
1212
13+
## Remarks
14+
1315
The identifier caused a syntax error.
1416

1517
This error can be caused by using the old style for the formal parameter list. You must specify the type of formal parameters in the formal parameter list.
1618

19+
## Example
20+
1721
The following sample generates C2081:
1822

1923
```c

docs/error-messages/compiler-errors-1/compiler-error-c2082.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 87a6d442-157c-46e8-9bff-8388f8338ae0
1010

1111
> redefinition of formal parameter 'identifier'
1212
13+
## Remarks
14+
1315
A formal parameter to a function is redeclared within the function body. To resolve the error, remove the redefinition.
1416

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

1721
```cpp

docs/error-messages/compiler-errors-1/compiler-error-c2083.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 5fc4f931-eab6-4d8d-a3ee-3b8e11e64b18
1010

1111
> struct/union comparison illegal
1212
13+
## Remarks
14+
1315
A structure or union is compared directly with another user-defined type. This is not allowed unless a comparison operator has been defined or a conversion to a scalar type exists.

docs/error-messages/compiler-errors-1/compiler-error-c2084.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 990b107f-3721-4851-ae8b-4b69a8c149ed
1010

1111
> function '*function*' already has a body
1212
13+
## Remarks
14+
1315
The function has already been defined.
1416

1517
Before Visual Studio 2002,

docs/error-messages/compiler-errors-1/compiler-error-c2085.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 0a86785c-8e6f-481b-8c7b-412220c1950d
1010

1111
> 'identifier' : not in formal parameter list
1212
13+
## Remarks
14+
1315
The identifier was declared in a function definition but not in the formal parameter list. (ANSI C only)
1416

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

1721
```c

docs/error-messages/compiler-errors-1/compiler-error-c2086.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ helpviewer_keywords: ["C2086"]
99

1010
> 'identifier' : redefinition
1111
12+
## Remarks
13+
1214
The identifier is defined more than once, or a subsequent declaration differs from a previous one.
1315

1416
C2086 can also be the result of incremental building for a referenced C# assembly. Rebuild the C# assembly to resolve this error.
1517

18+
## Example
19+
1620
The following sample generates C2086:
1721

1822
```cpp

docs/error-messages/compiler-errors-1/compiler-error-c2087.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 89761e83-415a-4468-a4c6-b6dedfd1dd6a
1010

1111
> 'identifier' : missing subscript
1212
13+
## Remarks
14+
1315
The definition of an array with multiple subscripts is missing a subscript value for a dimension higher than one.
1416

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

1721
```cpp

docs/error-messages/compiler-errors-1/compiler-error-c2088.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: b93f7094-185b-423d-8bb9-507cd757dbf5
1010

1111
> 'operator' : illegal for 'class-key'
1212
13+
## Remarks
14+
1315
The operator was not defined for the structure or union. This error is only valid for C code.
1416

17+
## Example
18+
1519
The following sample generates C2088 three times:
1620

1721
```c

docs/error-messages/compiler-errors-1/compiler-error-c2089.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 7c777775-5535-4eea-b6a2-340b71af9560
1010

1111
> 'identifier' : 'class-key' too large
1212
13+
## Remarks
14+
1315
The specified structure or union exceeds the 4GB limit.

docs/error-messages/compiler-errors-1/compiler-error-c2090.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: e8176e55-382b-453d-aa27-6597f0274afd
1010

1111
> function returns array
1212
13+
## Remarks
14+
1315
A function cannot return an array. Return a pointer to an array instead.
1416

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

1721
```cpp

0 commit comments

Comments
 (0)