void (**vt)() = *(void (***)())ptr; a helper variable for virtual table in
c++
I found this technique in the following link:
http://www.codeproject.com/Tips/90875/Displaying-vtable-when-debugging
and there, he uses one helper variable
void (**vt)() = *(void (***)())ptr;
to help display the virtual function table.
But if I change it to
void (**vt)() = (void (**)())ptr;
it does not work as the previous one.
Could someone help me to explain what magic plays here, please?
No comments:
Post a Comment