This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How can I get the vtable pointer or name?


Mike Sharov wrote:
I would like to get a pointer to the vtable of a class (C++) without
actually instantiating the class, for the purpose of calling a virtual
function. The idea is to have a virtual static member. Is there any way
to do this under gcc? Any ugly and unportable hack is fine as long as I
don't have to actually create the vtable's mangled name by hand.

What is a virtual static member? I.e., how do you know which one to call without an object instance?


--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
Microsoft, electricity, network connectivity. For a secure system pick any two. -- Iain D Broadfoot (paraphrased, from cluefire.net)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]