|
|
|||
![]() |
Department of Engineering |
| University of Cambridge > Engineering Department > computing help |
1L<<6'
which shifts all the bits of the long 1 left 6
bits. Then you need to do a bit-wise OR using
`i = i | (1L<<6)'.
1L<<6' then inverting
the bits using the ~ operator. Then you need to do a bit-wise
AND using the & operator. The whole operation is
`i =i & ~(1<<6)' which can be contracted to `i &= ~(1<<6)'.
unsigned int mask = KeyPressMask | ButtonPressMask;