Skip to content

Commit fa049f3

Browse files
authored
Merge pull request #5517 from Rageking8/structure-error-references-in-range-c2001-c2020
Structure error references in range [C2001, C2020]
2 parents fe193da + 272eae8 commit fa049f3

19 files changed

+134
-91
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Error C2001"
32
title: "Compiler Error C2001"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2001"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2001"]
66
helpviewer_keywords: ["C2001"]
7-
ms.assetid: 0c3a7821-d8e5-4398-ab5a-4116d46e8dda
87
---
98
# Compiler Error C2001
109

11-
newline in constant
10+
> newline in constant
11+
12+
## Remarks
1213

1314
A string constant cannot be continued on a second line unless you do the following:
1415

@@ -18,9 +19,9 @@ A string constant cannot be continued on a second line unless you do the followi
1819

1920
Ending the first line with \n is not sufficient.
2021

21-
## Examples
22+
## Example
2223

23-
The following sample generates C2001:
24+
The following example generates C2001:
2425

2526
```cpp
2627
// C2001.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2002.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 C2002"
32
title: "Compiler Error C2002"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2002"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2002"]
66
helpviewer_keywords: ["C2002"]
7-
ms.assetid: 91982314-203a-4de1-b884-94e39a623f61
87
---
98
# Compiler Error C2002
109

11-
invalid wide-character constant
10+
> invalid wide-character constant
11+
12+
## Remarks
1213

1314
The multibyte-character constant is not valid.
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 C2003"
32
title: "Compiler Error C2003"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2003"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2003"]
66
helpviewer_keywords: ["C2003"]
7-
ms.assetid: 3161bc08-593d-4448-9fd3-4e3810be9e82
87
---
98
# Compiler Error C2003
109

11-
expected 'defined id'
10+
> expected 'defined id'
11+
12+
## Remarks
1213

1314
An identifier must follow the preprocessor keyword.

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Error C2004"
32
title: "Compiler Error C2004"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2004"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2004"]
66
helpviewer_keywords: ["C2004"]
7-
ms.assetid: d81526dd-3a00-4593-87b0-d910d3d29bca
87
---
98
# Compiler Error C2004
109

11-
expected 'defined(id)'
10+
> expected 'defined(id)'
11+
12+
## Remarks
1213

1314
An identifier must appear in the parentheses following the preprocessor keyword.
1415

1516
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.
1617

17-
## Examples
18+
## Example
1819

19-
The following sample generates C2004:
20+
The following example generates C2004:
2021

2122
```cpp
2223
// C2004.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2005.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 C2005"
32
title: "Compiler Error C2005"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2005"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2005"]
66
helpviewer_keywords: ["C2005"]
7-
ms.assetid: 090530ed-e0ec-4358-833a-ca24260e7ffe
87
---
98
# Compiler Error C2005
109

11-
\#line expected a line number, found 'token'
10+
> #line expected a line number, found 'token'
11+
12+
## Remarks
1213

1314
The `#line` directive must be followed by a line number.
1415

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

1720
```cpp
1821
// C2005.cpp

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
---
22
title: "Compiler Error C2006"
33
description: "Learn more about: Compiler Error C2006"
4-
ms.date: "01/28/2025"
4+
ms.date: 01/28/2025
55
f1_keywords: ["C2006"]
66
helpviewer_keywords: ["C2006"]
77
---
88
# Compiler Error C2006
99

10-
'directive': expected "FILENAME" or \<FILENAME>
10+
> 'directive': expected "FILENAME" or \<FILENAME>
11+
12+
## Remarks
1113

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

14-
The following sample generates C2006:
16+
## Example
17+
18+
The following example generates C2006:
1519

1620
```cpp
1721
// C2006.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2007.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 C2007"
32
title: "Compiler Error C2007"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2007"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2007"]
66
helpviewer_keywords: ["C2007"]
7-
ms.assetid: ecd09d99-5036-408b-9e46-bc15488f049e
87
---
98
# Compiler Error C2007
109

11-
\#define syntax
10+
> #define syntax
11+
12+
## Remarks
1213

1314
No identifier appears after a `#define`. To resolve the error, use an identifier.
1415

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

1720
```cpp
1821
// C2007.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2008.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 C2008"
32
title: "Compiler Error C2008"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2008"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2008"]
66
helpviewer_keywords: ["C2008"]
7-
ms.assetid: e748ccbe-ffd4-4008-aca7-e53c25225209
87
---
98
# Compiler Error C2008
109

11-
'character' : unexpected in macro definition
10+
> 'character' : unexpected in macro definition
11+
12+
## Remarks
1213

1314
The character appears immediately following the macro name. To resolve the error, there must be a space after the macro name.
1415

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

1720
```cpp
1821
// C2008.cpp

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2009"
32
title: "Compiler Error C2009"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2009"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2009"]
66
helpviewer_keywords: ["C2009"]
7-
ms.assetid: fe9d94ed-20a5-4d83-b9c4-60ee69d2f30a
87
---
98
# Compiler Error C2009
109

11-
reuse of macro formal 'identifier'
10+
> reuse of macro formal 'identifier'
11+
12+
## Remarks
1213

1314
The formal parameter list of a macro definition uses the identifier more than once. Identifiers in the macro's parameter list must be unique.
1415

15-
## Examples
16+
## Example
1617

17-
The following sample generates C2009:
18+
The following example generates C2009:
1819

1920
```cpp
2021
// C2009.cpp

docs/error-messages/compiler-errors-1/compiler-error-c2010.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 C2010"
32
title: "Compiler Error C2010"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2010"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C2010"]
66
helpviewer_keywords: ["C2010"]
7-
ms.assetid: 5795ed1d-e206-410b-b7b4-528d125c67b4
87
---
98
# Compiler Error C2010
109

11-
'character' : unexpected in macro formal parameter list
10+
> 'character' : unexpected in macro formal parameter list
11+
12+
## Remarks
1213

1314
The character is used incorrectly in the formal parameter list of a macro definition. Remove the character to resolve the error.
1415

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

1720
```cpp
1821
// C2010.cpp

0 commit comments

Comments
 (0)