VC++ data type: wchar_t v.s. unsigned short and compiler option /Zc:wchar_t
A variable of __wchar_t designates a wide-character or multibyte character type. By default wchar_t is a typedef for unsigned short. Use the L prefix before a character or string constant to designate the wide-character-type constant. When compiling with /Zc:wchar_t or /Za, the compiler can distinguish between an unsigned short and wchar_t for function overload purposes.
https://msdn.microsoft.com/en-us/library/s3f49ktz(v=vs.100).aspx
https://msdn.microsoft.com/en-us/library/dh8che7s(v=vs.100).aspx
A variable of __wchar_t designates a wide-character or multibyte character type. By default wchar_t is a typedef for unsigned short. Use the L prefix before a character or string constant to designate the wide-character-type constant. When compiling with /Zc:wchar_t or /Za, the compiler can distinguish between an unsigned short and wchar_t for function overload purposes.
https://msdn.microsoft.com/en-us/library/s3f49ktz(v=vs.100).aspx
https://msdn.microsoft.com/en-us/library/dh8che7s(v=vs.100).aspx
https://msdn.microsoft.com/en-us/library/0k0w269d(v=vs.100).aspx
VS 2010: Project --> Properties --> Configuration Properties --> C/C++ --> Language --> Treat WChar_t As Built in Type --> Yes or No.