[ACCEPTED]-What is difference between TCHAR and WCHAR?-winapi
If you read the entire header, you will 2 find:
#ifdef _UNICODE typedef WCHAR TCHAR; #else typedef char TCHAR; #endif
or words to that effect.
Perhaps MS 1 has removed the narrow option of late.
TCHAR can be either
WCHAR based on the platform.
WCHAR is 1 always a 16-bit Unicode character,
A WCHAR if UNICODE is defined, a 3 CHAR otherwise.
A 16-bit Unicode character. For 2 more information, see Character Sets Used 1 By Fonts.
Technically speaking there is no difference 6 because you cannot typedef two different 5 entities to a single one. Let us See An 4 Example...
typedef char a; typedef char b; typedef a b, c;
This Definition Works But If a 3 Change The Above Definition To This
typedef char a; typedef char * b; typedef a b, c;
Error 1 error C2040: 'b' : 'a' differs in levels of indirection from 'char *'
typedef char a; typedef int b; typedef a b, c;
Error 1 error C2371: 'b' : redefinition; different basic types
So 2 By Analyzing These Things Only Same Type 1 Can Defined Together.
More Related questions