How do I bit shift a long by more than 32 bits?
- by mach7
It seems like I should be able to perform bit shift in C/C++ by more than 32 bits provided the left operand of the shift is a long. But this doesn't seem to work, at least with the g++ compiler.
Example:
unsigned long A = (1L << 37)
gives
A = 0
which isn't what I want. Am I missing something or is this just not possible?
-J