Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>wchar_t</code> is a c++ defined type, that is 16 bits in Visual Studio, but is 32bits in various gcc compilers. Its always capable of holding a unicode codepoint.</p> <p><code>TCHAR</code> and <code>_TCHAR</code> are not "unicode" characters - theyre meant to be used in code that may be compiled and/or used in Unicode OR Ansi programs:</p> <p><code>_TCHAR</code> is - from its leading underscore - a Microsoft C runtime library "extension" to the c++ standard. <code>_TCHAR</code> will, when <code>_UNICODE</code> is defined, be a 16bit character, when <code>_MBCS</code> is defined, be a multibyte character, and when neither is defined, be a singlebyte character. Use this type if you use MS CRT defined string functions that are prefixed with <code>_t</code>: <code>_tcscpy()</code> for example is the replacement for <code>strcpy()</code>/<code>wcscpy()</code>.</p> <p><code>TCHAR</code> is a defined by the Win32 API. This type is a <code>CHAR</code> when <code>UNICODE</code> is not defined, and a <code>WCHAR</code> when <code>UNICODE</code> is defined (note the lack of an underscore on this type). Windows API functions that take strings likewise expect <code>WCHAR</code> strings in <code>UNICODE</code> builds and <code>CHAR</code> strings in non unicode builds.</p> <p>To summarize:</p> <ul> <li><code>wchar_t</code> is a cross platform c++ defined type that can hold a unicode code point - on compilers other than Microsoft, is frequently 32bits wide.</li> <li><code>_TCHAR</code> is a microsoft defined type that is paired with <code>_tcs*</code> c runtime functions that changes its type based on the definition of <code>_UNICODE</code> and/or <code>_MBCS</code>.</li> <li><code>TCHAR</code> is a Windows API defined type that changes its type based on the definition (or not) of <code>UNICODE</code>.</li> <li><code>WCHAR</code> is the native Windows API type for dealing with unicode strings. When using a GCC toolset to build windows code, this will be 16bits wide where <code>wchar_t</code> might not.</li> </ul> <p>Does that help? I don't know.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload