Skip to content

Commit 111df47

Browse files
authored
Merge pull request #5161 from Rageking8/update-c2006
Update C2006
2 parents 0240e21 + b21e5a0 commit 111df47

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Error C2006"
32
title: "Compiler Error C2006"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2006"
4+
ms.date: "01/28/2025"
55
f1_keywords: ["C2006"]
66
helpviewer_keywords: ["C2006"]
7-
ms.assetid: caaed6f7-ceb9-4742-8820-d66657c0b04d
87
---
98
# Compiler Error C2006
109

11-
'directive' expected a filename, found 'token'
10+
'directive': expected "FILENAME" or \<FILENAME>
1211

13-
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, make sure *token* is a valid filename. Also, put the filename in double quotes or angle brackets.
12+
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.
1413

1514
The following sample generates C2006:
1615

1716
```cpp
1817
// C2006.cpp
19-
#include stdio.h // C2006
20-
```
21-
22-
Possible resolution:
23-
24-
```cpp
25-
// C2006b.cpp
2618
// compile with: /c
27-
#include <stdio.h>
19+
#include iostream // C2006
20+
#include 'iostream' // C2006
21+
#include <iostream> // OK
2822
```

0 commit comments

Comments
 (0)