Microsoft Docs – Windows API

WCHAR

WCHAR is a Windows data type that represents a 16‑bit Unicode character. It is used throughout the Windows API to handle text in the Unicode format.

Syntax

typedef wchar_t WCHAR;

Remarks

Related Types

Example

Printing a WCHAR string using wprintf:

#include <stdio.h>
#include <windows.h>

int wmain(void)
{
    WCHAR greeting[] = L"Hello, 世界!";
    wprintf(L"%s\n", greeting);
    return 0;
}

See Also