I have some hierarchy: base, derived classes and some structure storing user data as void*. That void can store both Base and Derived classes pointers. Main problem that I d
If you know it's a derived pointer and you want to get a base pointer, you can do this:
Base* d_restored_to_base = (Base*)(Derived*)derived_v;
You will find that the Base* points to a different location than the Derived*, so the intermediary cast is required.