Hi C++ Coders,
Can you please help me regarding one thing.
For pure virtual function, what are the entries created in the virtual method table.
Say I have a program:
So here when derived class functions will be called through base class pointer, then how with the help of virtual method table the proper function is calling?Code:class base { public: virtual void display() = 0; ........... }; class derived1:public base { public: void display() { cout<<"Derived1:"; } }; class derived2:public derived { public: void display() { cout<<"Derived2:"; } };
And what are the entries in the 3 vtable for these 3 classes?
And one more query:
To see vtable core dump, is there any compiler flag (g++) in Solaris / Red Hat Linux to be used?
Thanks in advance.
With regards,
u_peerless



LinkBack URL
About LinkBacks




CornedBee