I'm having a problem with assigning 64-bit hex values to unsigned long variables in MS VS2005 c++ compiler.
After this declaration and assignment, the value in Number is always 0. However, if the hex value is 0x0000000000000 001, then the value is 1 as expected. It seems like the compiler is truncating the most significant 32 bits. How can I make this work?
Code:
unsigned long Number; Number = 0x1000000000000000UL;
Comment