Consider the following piece of code:
void **v_dptr(nullptr);
int **i_dptr = static_cast(v_dptr);
The above example produces
There are good answers for Q1, and the answer to Q2 depends a lot on the intention. If void **v_dptr
is intended to be a pointer to a "generic" void*
which you know is actually a int*
and you want to cast accordingly, the following might be what you want:
int *i_ptr = static_cast(*v_dptr);
int **i_dptr = &i_ptr;