c++ - Setting all bits in int64_t -
from following code expect set bits in x 1, somehow first 32 bits set:
int64_t x = 0xffffffff; x<<32; x|=0xffffffff;
note: printing x after each line results in 4294967295 (32 lower bits set 1). also, tried using numeric_limits<int64_t>::min()
no success. question how set bits in x? using rhel5.5.
thx
x<<32
calculates result of shifting x
left 32 bits and nothing value. want use x <<= 32
instead.
Comments
Post a Comment