Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Language/Std/Strings/Unicode

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

An 8-bit "Ascii character" has type char (its literal values are char cVar = 'h'; and "hello", its Standard Library functions are named like strlen(), and its Win32 functions are named like SetWindowTextA()). A "wide-Unicode character" has type wchar_t (its literal values are wchar_t cwVar = L'h'; and L"hello", its Standard Library functions are named liked wcslen(), and its Win32 functions are named like SetWindowTextW()). Windows programmers use preprocessor macros in TCHAR cxVar = _TEXT('h'); to alias either char cxVar = 'h'; or wchar_t cxVar = L'h'; (these macros are controlled by Windows' build system). That same switching mechanism also controls the expansion of macros _tcslen() and SetWindowText(). Additional information about Unicode