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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -