Mihran Hovsepyan Mihran Hovsepyan - 11 months ago 107
C++ Question

What is difference between TCHAR and WCHAR?

I've opened winnt.h header file and found there this two lines:

typedef wchar_t WCHAR;



but there was comment in one of my posts that there is some difference between them. Then what is the difference?

Answer Source

If you read the entire header, you will find:

#ifdef _UNICODE
typedef WCHAR TCHAR;
typedef char TCHAR;

or words to that effect.

Perhaps MS has removed the narrow option of late.