Hello all,

I need to initialize a pointer variable with a knowing address. Please see code below, ptr is the final destination and value of ptr_address contains the address value, so I need to do something like ptr = *ptr_address.

Code:
int *ptr;
int *ptr_address;
int address;

address = 0x10000005;
ptr_address = &(address);
ptr = *ptr_address;
The problem is that compiler gives the following warning message:

warning: assignment makes pointer from integer without a cast [enabled by default]


Is my code wrong or there is any other way to do it without receiving this compiler warning?

Thanks.