Off the top of my head, virtual functions are implemented through v-tables http://en.wikipedia.org/wiki/Virtual_table The size should be the size of a native pointer (4 bytes in 32 machines) but I could be wrong.
On Mon, Mar 28, 2011 at 11:37 AM, himanshu kansal <himanshukansal...@gmail.com> wrote: > can u gv any link for reference...??? > > On Sat, Mar 26, 2011 at 12:29 PM, D.N.Vishwakarma@IITR <deok...@gmail.com> > wrote: >> >> there is vtable known as virtual table which contains addresses of virtual >> functions . >> And there is vptr a pointer that points to vtable of that class space >> occupied by class having virtual function wil be equal to space occupied by >> a pointer * number of virtual functions .. >> I think this if there is any correction please let meĀ know... >> >> On Sat, Mar 26, 2011 at 12:00 PM, himanshu kansal >> <himanshukansal...@gmail.com> wrote: >>> >>> wht is the space occupied by a class in c++ whn it contains a virtual >>> fn..... >>> How are the virtual fn implemented internally by c++....... >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algogeeks@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> >> >> -- >> With Regards >> Deoki Nandan Vishwakarma >> IITR MCA >> Mathematics Department >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Cheers, hammett http://hammett.castleproject.org/ -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.