问题描述
当我做的时候.....
________________________________________________
unsigned int iTest; //让asume''int''= 32bit
iTest = 0xFFFFFFFF;
iTest ++;
________________________________________________
请问std说出现在会发生什么?
我可以安全地假设iTest现在为0或者它是CPU还是系统依赖的?
TIA,〜 .rhavin;)
第二个。
best,zeppe
第二个。
最好,zeppe
CPU依赖?该死的,这是最糟糕的情况!
第二个。
最好,zeppe
这是不正确的。假设unsigned int是32位,结果将是
总是为0.
REH
when i do a.....
________________________________________________
unsigned int iTest; // lets asume ''int'' = 32bit
iTest = 0xFFFFFFFF;
iTest++;
________________________________________________
does the std say something what shall happen now?
May i safely assume iTest is now 0 or is it CPU or sys-dependent?
TIA, ~.rhavin;)
the second one.
best, zeppe
the second one.
best, zeppe
CPU-dependent? damn, that''s the worst case!
the second one.
best, zeppe
That is incorrect. Assuming unsigned int is 32-bits, result will
always be 0.
REH
这篇关于inc unsigned(无论如何)超出限制。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!