在文章< 7b28c8e1-0dd7-48ee-ac33-40e7dc517139 @ p25g2000hsf.googlegroups.com>, en ***** @ yahoo.com 说... [...] In article <7b28c8e1-0dd7-48ee-ac33-40e7dc517139@p25g2000hsf.googlegroups.com>, en*****@yahoo.com says... [ ... ] temp = -128; temp=-128; 我的猜测是,这不是你想要的。我猜你的意思是'' - ''' 而不是'= ='''。 有趣的是,有一次在C的历史,这将实际上做了同样的事情,但是那是'纯粹的历史,所以 很久以前我怀疑它是否已经进入C ++所有。 - 后来, 杰瑞。 宇宙是一个自己想象的虚构。 My guess is that this isn''t what you intended. I''d guess you meant ''-=''instead of ''=-''. Interestingly enough, at one time in the history of C, this wouldactually have done the same thing, but that''s purely historical, and solong ago I doubt it ever made it into C++ at all. --Later,Jerry. The universe is a figment of its own imagination. Jerry Coffin写道: Jerry Coffin wrote: 文章< 7b28c8e1-0dd7 -48ee-ac33-40e7dc517139 @ p25g2000hsf.googlegroups.com>, en ***** @ yahoo。 com 说... [...] In article <7b28c8e1-0dd7-48ee-ac33-40e7dc517139@p25g2000hsf.googlegroups.com>, en*****@yahoo.com says...[ ... ] >温度= -128; > temp=-128; 我的猜测是,这不是你想要的。我猜你的意思是'' - ''' 而不是'= ='''。 有趣的是,有一次在C的历史,这将实际上做了同样的事情,但是那是'纯粹的历史,所以 很久以前我怀疑它是否已经进入C ++所有。 My guess is that this isn''t what you intended. I''d guess you meant ''-=''instead of ''=-''.Interestingly enough, at one time in the history of C, this wouldactually have done the same thing, but that''s purely historical, and solong ago I doubt it ever made it into C++ at all. 我认为你是对的。 但我可以建议使用 bits [0] =(temp& 128)? 1:0; 代替 if(temp> = 128){ bits [ 0] = 1; temp = -128; } 它会给优化者更多的工作机会。 Andy I think you''re right. But might I suggest using bits[0] = (temp & 128) ? 1 : 0; in place of if(temp >= 128){bits[0] = 1;temp=-128;} It''ll give the optimiser more chance to work. Andy 这篇关于有关位的问题(调试&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 10:03