Hi everyone,
I have an object called x and a function which takes a double. Is it possible to pass a pointer to x to the function which takes a double.
The function which recieves it only needs to store, and it will be passed to another function where the pointer can be cast back to object x and dereferenced like normal.
Ie in C It would look like this (not sure it would work but it explains what im trying to do):
char p;
char *d;
int t = (int) &p;
d = (int*) t;
*d = 1;
How would I do this?
I have an object called x and a function which takes a double. Is it possible to pass a pointer to x to the function which takes a double.
The function which recieves it only needs to store, and it will be passed to another function where the pointer can be cast back to object x and dereferenced like normal.
Ie in C It would look like this (not sure it would work but it explains what im trying to do):
char p;
char *d;
int t = (int) &p;
d = (int*) t;
*d = 1;
How would I do this?