Skip to content

Commit 20b3126

Browse files
authored
Merge pull request #4974 from Rageking8/add-example-for-c4066
Add example for C4066
2 parents 329c49d + a465ba7 commit 20b3126

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
---
22
description: "Learn more about: Compiler Warning (level 3) C4066"
33
title: "Compiler Warning (level 3) C4066"
4-
ms.date: "11/04/2016"
4+
ms.date: "03/06/2024"
55
f1_keywords: ["C4066"]
66
helpviewer_keywords: ["C4066"]
7-
ms.assetid: f2ae6465-a140-459a-87fd-c8f25fafedd4
87
---
98
# Compiler Warning (level 3) C4066
109

1110
characters beyond first in wide-character constant ignored
1211

1312
The compiler processes only the first character of a wide-character constant.
13+
14+
```cpp
15+
// C4066.cpp
16+
// compile with: /W3
17+
#include <iostream>
18+
19+
int main()
20+
{
21+
wchar_t wc = L'AB'; // C4066
22+
23+
std::wcout << wc;
24+
}
25+
```
26+
27+
```output
28+
A
29+
```

0 commit comments

Comments
 (0)