Skip to content

Commit 91d5851

Browse files
Merge pull request #5708 from Rageking8/improve-c2014-error-reference
Improve C2014 error reference
2 parents 7e42d5c + 8bbe1d3 commit 91d5851

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Compiler Error C2014"
33
description: "Learn more about: Compiler Error C2014"
4-
ms.date: 11/04/2016
4+
ms.date: 08/25/2025
55
f1_keywords: ["C2014"]
66
helpviewer_keywords: ["C2014"]
77
---
@@ -11,22 +11,21 @@ helpviewer_keywords: ["C2014"]
1111
1212
## Remarks
1313

14-
The `#` sign of a preprocessor directive must be the first character on a line that is not white space.
14+
The `#` sign of a [preprocessor directive](../../preprocessor/preprocessor-directives.md) must be the first character on a line that is not white space. Ensure that the previous line doesn't contain a trailing escape.
1515

1616
## Example
1717

1818
The following example generates C2014:
1919

2020
```cpp
2121
// C2014.cpp
22-
int k; #include <stdio.h> // C2014
23-
```
22+
// compile with: /c
2423

25-
Possible resolution:
24+
int a; #define A // C2014
2625

27-
```cpp
28-
// C2014b.cpp
29-
// compile with: /c
30-
int k;
31-
#include <stdio.h>
26+
int b;\
27+
#define B // C2014
28+
29+
int c;
30+
#define C // OK
3231
```

0 commit comments

Comments
 (0)