🔒 Locked
Why are these the same?
Advertisement
Original Post
Why are these statements the same, They shouldnt be:
__int64 ints,ints1;
ints = (80 << 56) | (70 << 48) | (60 << 40) | (50 << 32) | (40 << 24) | (30 << 16) | (20 << 8) | 10;
ints1 = (40 << 24) | (30 << 16) | (20 << 8) | 10;
if(ints==ints1){WHY ARE THEY THE SAME????}
They are the same, why, why would __int64 only hold 32 bits?
Hi,
this sounds to me as if the == does not a 64 bit compare but only 32 bit. If you look at your line of code, you will see that the lower 32 bit of both __int64 are equal. I couldn''t find the definition of the compare operator... perhaps there isn''t one for 64 bit ?
Kind regards,
Metron
this sounds to me as if the == does not a 64 bit compare but only 32 bit. If you look at your line of code, you will see that the lower 32 bit of both __int64 are equal. I couldn''t find the definition of the compare operator... perhaps there isn''t one for 64 bit ?
Kind regards,
Metron
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement