Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions docs/error-messages/compiler-errors-1/compiler-error-c2014.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Compiler Error C2014"
description: "Learn more about: Compiler Error C2014"
ms.date: 11/04/2016
ms.date: 08/25/2025
f1_keywords: ["C2014"]
helpviewer_keywords: ["C2014"]
---
Expand All @@ -11,22 +11,21 @@ helpviewer_keywords: ["C2014"]

## Remarks

The `#` sign of a preprocessor directive must be the first character on a line that is not white space.
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.

## Example

The following example generates C2014:

```cpp
// C2014.cpp
int k; #include <stdio.h> // C2014
```
// compile with: /c

Possible resolution:
int a; #define A // C2014

```cpp
// C2014b.cpp
// compile with: /c
int k;
#include <stdio.h>
int b;\
#define B // C2014

int c;
#define C // OK
```