I have a pointer void* p which points to X object. How can I make a void** p2 pointer which points to p pointer? The reason I want to do this is that position of X object may change after remapping it so I want *p2 to always access the new address. I wanted to achieve this by casting &p to void**, but this did not work.
Share
It’s not clear from your question as to whether you have tried this:
This creates a pointer
p2which points atp1, which in turn points tox.