Skip to content

Commit 4d78744

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C2001, C2020]
1 parent 393bb58 commit 4d78744

19 files changed

+63
-3
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 0c3a7821-d8e5-4398-ab5a-4116d46e8dda
1010

1111
> newline in constant
1212
13+
## Remarks
14+
1315
A string constant cannot be continued on a second line unless you do the following:
1416

1517
- End the first line with a backslash.
@@ -18,7 +20,7 @@ A string constant cannot be continued on a second line unless you do the followi
1820

1921
Ending the first line with \n is not sufficient.
2022

21-
## Examples
23+
## Example
2224

2325
The following sample generates C2001:
2426

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 91982314-203a-4de1-b884-94e39a623f61
1010

1111
> invalid wide-character constant
1212
13+
## Remarks
14+
1315
The multibyte-character constant is not valid.
1416

1517
### To fix by checking the following possible causes

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 3161bc08-593d-4448-9fd3-4e3810be9e82
1010

1111
> expected 'defined id'
1212
13+
## Remarks
14+
1315
An identifier must follow the preprocessor keyword.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ ms.assetid: d81526dd-3a00-4593-87b0-d910d3d29bca
1010

1111
> expected 'defined(id)'
1212
13+
## Remarks
14+
1315
An identifier must appear in the parentheses following the preprocessor keyword.
1416

1517
This error can also be generated as a result of compiler conformance work that was done for Visual Studio .NET 2003: missing parenthesis in preprocessor directive. If the closing parenthesis is missing from a preprocessor directive, the compiler will generate an error.
1618

17-
## Examples
19+
## Example
1820

1921
The following sample generates C2004:
2022

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 090530ed-e0ec-4358-833a-ca24260e7ffe
1010

1111
> #line expected a line number, found 'token'
1212
13+
## Remarks
14+
1315
The `#line` directive must be followed by a line number.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ helpviewer_keywords: ["C2006"]
99

1010
> 'directive': expected "FILENAME" or \<FILENAME>
1111
12+
## Remarks
13+
1214
Directives such as [#include](../../preprocessor/hash-include-directive-c-cpp.md) or [#import](../../preprocessor/hash-import-directive-cpp.md) require a filename. To resolve the error, ensure the filename is valid and enclosed in either double quotes or angle brackets.
1315

16+
## Example
17+
1418
The following sample generates C2006:
1519

1620
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: ecd09d99-5036-408b-9e46-bc15488f049e
1010

1111
> #define syntax
1212
13+
## Remarks
14+
1315
No identifier appears after a `#define`. To resolve the error, use an identifier.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: e748ccbe-ffd4-4008-aca7-e53c25225209
1010

1111
> 'character' : unexpected in macro definition
1212
13+
## Remarks
14+
1315
The character appears immediately following the macro name. To resolve the error, there must be a space after the macro name.
1416

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

1721
```cpp

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ ms.assetid: fe9d94ed-20a5-4d83-b9c4-60ee69d2f30a
1010

1111
> reuse of macro formal 'identifier'
1212
13+
## Remarks
14+
1315
The formal parameter list of a macro definition uses the identifier more than once. Identifiers in the macro's parameter list must be unique.
1416

15-
## Examples
17+
## Example
1618

1719
The following sample generates C2009:
1820

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 5795ed1d-e206-410b-b7b4-528d125c67b4
1010

1111
> 'character' : unexpected in macro formal parameter list
1212
13+
## Remarks
14+
1315
The character is used incorrectly in the formal parameter list of a macro definition. Remove the character to resolve the error.
1416

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

1721
```cpp

0 commit comments

Comments
 (0)