winapi - Storing double* in a long (C++) -
Then I have this current bit code that is fully prepared in Visual Studio 2005, even though the target platform is 32 bit , It does not work in 64 bit. I do not understand why; In fact I've never seen a pointer before, is it the right C ++?
# real-time real-time * point typed; Point * ptari; // (So this is basically double ** ptary?) Long arylen = (long) ptary [0]; Thanks in advance, it seems to work on 32 bit systems because both signal and long are 32 bit wide I fail to work on 64 bit systems, because the indicators 64 Bits are wide, but long (maybe) still only 32 bit wide. You can easily sizeof (double *)
and sizeof (long)
. My guess is that the 64 bit system will produce 8 and 4, respectively.
If you need an integer type that is capable of keeping an indicator, then use intptr_t
& lt; Stdint.h & gt;
to