i am just messed up .. how can i store a hex no. as an adress of a varaible
e.g i got an integer value x i need to convert it into hexadecimal then need to make it an adress of a variable "a" so if i do cout<<&a it gives the adress i-e hex value of x
I am with Galik. I have no idea what you're trying to do. These should help you. Just put them together the way you need.
int x = 5; // value at x is equal to 5
int* xPtr = &x // value at xPtr is equal to the address of x
int* randomPtr = (int*)31582; // value at randomPtr is equal to 31582
int* anotherandomPtr = (int*)0x005C6600; // value at anotherrandomPtr is equal to 0x005C6600
Every variable is an address. x is an address that stores the value 5. xPtr is an address that stores the address of an integer, etc.
hexadecimal is simply another representation for a number. 0xF IS 15; they are the EXACT same thing.