From a465ba78943ee93c2eeb3e47c5435d43515bc6be Mon Sep 17 00:00:00 2001 From: Rageking8 <106309953+Rageking8@users.noreply.github.com> Date: Wed, 6 Mar 2024 18:45:53 +0800 Subject: [PATCH] Add example for C4066 --- .../compiler-warning-level-3-c4066.md | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4066.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4066.md index 509d435b2fd..11ddd3399f2 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4066.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4066.md @@ -1,13 +1,29 @@ --- description: "Learn more about: Compiler Warning (level 3) C4066" title: "Compiler Warning (level 3) C4066" -ms.date: "11/04/2016" +ms.date: "03/06/2024" f1_keywords: ["C4066"] helpviewer_keywords: ["C4066"] -ms.assetid: f2ae6465-a140-459a-87fd-c8f25fafedd4 --- # Compiler Warning (level 3) C4066 characters beyond first in wide-character constant ignored The compiler processes only the first character of a wide-character constant. + +```cpp +// C4066.cpp +// compile with: /W3 +#include + +int main() +{ + wchar_t wc = L'AB'; // C4066 + + std::wcout << wc; +} +``` + +```output +A +```