Data Type Mappings

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Data Type Mappings.

These data-type mappings are defined in TCHAR.H and depend on whether the constant _UNICODE or _MBCS has been defined in your program.

For related information, see Using TCHAR.H Data Types with _MBCS Code.

Generic-Text Data Type Mappings

Generic-text

data type name
SBCS (_UNICODE,

_MBCS not

defined)
_MBCS

defined
_UNICODE

defined
_TCHARcharcharwchar_t
_tfinddata_t_finddata_t_finddata_t_wfinddata_t
_tfinddata64_t__finddata64_t__finddata64_t__wfinddata64_t
_tfinddatai64_t_finddatai64_t_finddatai64_t_wfinddatai64_t
_TINTintintwint_t
_TSCHARsigned charsigned charwchar_t
_TUCHARunsigned charunsigned charwchar_t
_TXCHARcharunsigned charwchar_t
_T or _TEXTNo effect (removed by preprocessor)No effect (removed by preprocessor)L (converts following character or string to its Unicode counterpart)

Generic-Text Mappings
Constant and Global Variable Mappings
Routine Mappings
A Sample Generic-Text Program
Using Generic-Text Mappings

Show: