windows – 区分TCHAR和_TCHAR

前端之家收集整理的这篇文章主要介绍了windows – 区分TCHAR和_TCHAR前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Windows标头tchar.h中定义的两个符号TCHAR和_TCHAR类型之间的差异有哪些?用例子解释.简要描述在代码中使用TCHAR而不是_TCHAR的情况. (10分)
在这里找到你的答案:

MSDN Forums >> Visual Studio Developer Center >> TCHAR vs _TCHAR

TCHAR and _TCHAR are identical,although since TCHAR doesn’t have a
leading underscore,Microsoft aren’t allowed to reserved it as a
keyword (imagine if you had a variable called TCHAR. Think what would
happen). Hence TCHAR will not be #defined when Language Extensions are
disabled (/Za).

TCHAR is defined in winnt.h (which you’ll get when you #include ),and also tchar.h under /Ze. _TCHAR is available only in tchar.h (which also #defines _TSCHAR and _TUCHAR). Those are unsigned/signed variants of the normal TCHAR data type.

原文链接:https://www.f2er.com/windows/364851.html

猜你在找的Windows相关文章