I know how to use the dereference and addressof operators and know how to use pointer arithmetic but the one thing I'm unsure of is how to actually set the address of a pointer manually, this is something along the lines of what I would want:
1 2 3 4 5 6 7 8 9 10 11
int main()
{
int setAddress()
{
int *ptr; // Declare pointer
&ptr = 0x002FFF20; // Set pointer address
return 0;
}
setAddress();
return 0;
}
If anyone can tell me how one does set the address of a pointer in C/C++ then I'd appreciate it greatly.