首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

大家帮看看这句话什么意思?该怎么处理

2012-02-07 
大家帮看看这句话什么意思?MSDN上关于64位机的编程注意的文章,urlhttp://msdn2.microsoft.com/en-us/libr

大家帮看看这句话什么意思?
MSDN上关于64位机的编程注意的文章,url=http://msdn2.microsoft.com/en-us/library/aa384242.aspx

Be   careful   when   using   POINTER_32   values   in   code   that   may   be   compiled   as   64-bit   code.   The   compiler   will   sign-extend   the   pointer   when   it   is   assigned   to   a   native   pointer   in   64-bit   code,   not   zero-extend   the   pointer.  
Be   careful   when   using   POINTER_64   values   in   code   that   may   be   compiled   as   32-bit   code.   The   compiler   will   sign-extend   the   pointer   in   32-bit   code,   not   zero-extend   the   pointer.  

什么时候美国人都说汉语就好了!!     大家一起努力,早晚让全世界都说汉语,不说汉语的用人民币砸死~~~~~~~~~~~~~~~

[解决办法]
应该就是说,在64位平台上使用32位指针,或在32位平台上使用64位指针,都会发生指针截断现象,而不是赋空指针。
[解决办法]
sign-extend : 符号拓展
zero-extend : 零拓展

比如说16位的有符号数字0xA000,拓展成32位数字时
如果是sign-extend, 由于原来的最高符号位是1, 那么拓展成32位后就成了0xFFFFA000
如果是zero-extend, 那所以不足的位都补0, 拓展成32位后就成了0x0000A000
[解决办法]
ls 正解。
如果是sign-extend, 原来符号位是啥,就补啥

热点排行