Unicode字符转换

问:

#define ABC L"ABC"

L 宏是干什么用的,和Unicode相关吗?
如果这样,这和
#define ABC _T("ABC")

有分别吗?

答:

L表示UNICODE串,比如wchar_t* str = L"yangsongx";
_T在ANSI编译模式下表示ANSI串,在UNICODE下表示UNICODE串,比如
TCHAR* str = _T("yangsongx");
在ANSI下编译就是 char* str = "yangsongx";
在UNICODE下编译就是 wchar_t* str = L"yangsongx";

http://blog.csdn.net/freebot/article/details/4826204

原文地址:https://www.cnblogs.com/ZHENGJUNupperclassman/p/7527148.html