bit shifting, becomes zero when it shouldn't.... bug?
#1

Код:
printf("%d", 95<<24 + 102<<16 + 109<<8 + 100);
prints zero for some reason when it isn't zero

Why?
Reply
#2

I assume it does left shifting the result of the addition. Using parentheses fixes it:
pawn Код:
(95<<24) + (102<<16) + (109<<8) + 100
Reply
#3

What "<<" mean ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)