I'm trying to do something very simple, at least I thought, with no success. I would like to assign the address pointed to by an integer pointer to the address pointed to by a char pointer. Example
//C++
int *pointerint;
char *pointerchar;
pointerchar = pointerint;
//
I've tried to do this severals different ways without success.
Example:
pointerchar = (char *) &pointerint;
The compiler excepts it but the address assigned to the pointer is zero. That can not be correct. Can anyone tell me how to do this correctly and what I am doing wrong. Thanks in advance for all your help.