You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Warning C2676: CHAR to WCHAR cast(CHAR_TO_WCHAR_CAST)**\
13
-
Example output:
14
12
> Cast between semantically different string types: char* to wchar_t\*. Use of invalid string can lead to undefined behavior.
15
13
16
-
## Description
14
+
This warning indicates a potentially incorrect cast from an ANSI string (`char_t*`) to a UNICODE string (`wchar_t *`).
17
15
18
-
This warning indicates a potentially incorrect cast from an ANSI string (`char_t*`) to a UNICODE string (`wchar_t *`). Because UNICODE strings have a character size of 2 bytes, this cast might yield strings that aren't correctly terminated. Using such strings with the `wcs*` library of functions could cause buffer overruns and access violations.
16
+
## Remarks
17
+
18
+
Because UNICODE strings have a character size of 2 bytes, this cast might yield strings that aren't correctly terminated. Using such strings with the `wcs*` library of functions could cause buffer overruns and access violations.
0 commit comments