Re: Can i get the class of an object of which i only have the address?
Tomás Ó hÉilidhe wrote:
> Virtual functions are achieved via a V-Table. That is, each object has a
> hidden pointer in it that points to a static structure that contains
> function pointers. (The Standard doesn't necessitate that this is how it's
> done, but this *is* how it's done).
Wrong. Virtual functions *may be* achieved by a vtable. Nothing in the
Standard mandates it. Anything code that assumes a vtable is by
definition non-portable.
|