加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows – 区分TCHAR和_TCHAR

发布时间:2020-12-14 04:12:05 所属栏目:Windows 来源:网络整理
导读:Windows标头tchar.h中定义的两个符号TCHAR和_TCHAR类型之间的差异有哪些?用例子解释.简要描述在代码中使用TCHAR而不是_TCHAR的情况. (10分) 在这里找到你的答案: MSDN Forums Visual Studio Developer Center TCHAR vs _TCHAR TCHAR and _TCHAR are identi
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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读