Hello,
I am currently upgrading a game engine from a 32bit system to a 64 bit system. there are definate spots where the original author was holding a pointer in an int.
struct myrefdata
{
int data;
};
now i want to upgrade this to a 64 bit system. my initial idea was that this should be a void * instead of an int so
struct myrefdata
{
void *data;
};
now what i am finding is where the author did intend to actually hold an int in this field needs to be adjusted.
int x = 100;
myRefData->data = x;
int y = (int)myRefData->data;
while this example is a large oversimplication. i was wondering for those with more 64bit experience that me for assistance.
i am using c++11 on all my target platforms.
how can i correctly convert a int to a void * and a void * to int, for the times i do want to hold an int in a void *?
another question...
assuming that there are other sections of the game engine where it is just impossible to convert that int to a void * but it does hold a pointer, is there a way i can force a memalloc in the 32bit space? or if i cant do that declare an array in global space of the program to hold the pointer and put this array in 32bit memory space.
very much appreciate any help anyone could provide.