I need to calculate the sizes in bytes of some very large files so I started playing around with unsigned __int64 datatypes.

As a test, I took 0x40000000 and said basically: num = _GB * 2;

(_GB being the hex number above)

and the result in num was: 0xffffffff80000000

Is there a compiler option I need to make this work properly, or am I not understanding something about these 64 bit types? I thought it should just be 0x80000000 without the leading 0xffffffff? Or am I totally out to lunch here?

Thanks!