TCHAR
TCHAR is a typedef defined in the Windows header tchar.h that provides a generic character type intended to simplify writing code that can be compiled for either ANSI or Unicode character sets. When UNICODE (and often _UNICODE) is defined, TCHAR resolves to wchar_t; otherwise it resolves to char. This enables code to handle text with a single type regardless of build configuration.
The tchar.h header also defines related generic string and pointer types, such as LPTSTR (pointer to TCHAR)
The generic entry points and utilities mirror this mapping: _tmain maps to main or wmain, and _tWinMain
Usage notes: TCHAR originated to ease porting between ANSI and Unicode Windows APIs and to support older