![]() |
|
#1
|
|||
|
|||
Pure Virtual Function - Virtual Method TableHi 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: CPP / C++ / C Code:
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? 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 Last edited by LuciWiz : 08-Jun-2008 at 16:02.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|||
|
#2
|
|||
|
|||
Re: Pure Virtual Function - Virtual Method TableVirtual Table is available for only pure virtual function.
Quote:
Basically, virtual table is just sort of array of function pointer. RTTI helps to investigate the object actual content type. After investigation, they will just called the correct class for the class. I hope this help. Please correct me if i wrong. |
|
#3
|
|||
|
|||
Re: Pure Virtual Function - Virtual Method TableVirtual Table is created even if it is not pure virtual function.
I got my answer, I posted this question in another forum. I got reply from them. cboard.cprogramming.com Thanks for your reply. |
|
#4
|
|||
|
|||
Re: Pure Virtual Function - Virtual Method TableQuote:
|
|
#5
|
|||
|
|||
Re: Pure Virtual Function - Virtual Method TableThat's means We cannot create object from abstract class or classes with pure virtual function.
Please post the link here and let other benefits. |
|
#6
|
|||
|
|||
Re: Pure Virtual Function - Virtual Method TableQuote:
However, note that pointers to abstract classes can be created. Quote:
|
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| run script command on ns2.26 | newbie06 | Computer Software Forum - Linux | 66 | 16-Jan-2010 10:53 |
| Flex and bison coding | lucky88star | C++ Forum | 5 | 24-Dec-2007 11:57 |
| What does =0 in Pure virtual function means? | Poolan | C++ Forum | 4 | 26-May-2006 14:58 |
| pure virtual function | vatsa_mitr | C++ Forum | 1 | 12-May-2006 00:41 |
| No output from loop function | crystalattice | C++ Forum | 2 | 20-Dec-2004 20:39 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The