If you know two pieces of information:
A memory address.
The type of the object stored in that address.
Then you logically have all you need to reference that object:
using namespace std;
int x = 1, y = 2;
int* p = (&x) + 1;
if ((long)&y ==...