vtable

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2005
Posts: 1
Reputation: durga prasad d is an unknown quantity at this point 
Solved Threads: 0
durga prasad d durga prasad d is offline Offline
Newbie Poster

vtable

 
0
  #1
Jul 7th, 2005
Hi all,
What is vtable ?
How many vtables created for this sample.

  1. class A
  2. {
  3. virtual void myFunc() = 0;
  4. };
  5. class B : public A
  6. {
  7. virtual void myFunc() = 0;
  8. };
  9.  
  10. class C: pulibc B
  11. {
  12. void myFunc()
  13. {
  14. cout <<"MyFunc"<<endl;
  15. }
  16. };
  17.  
  18. void main(void)
  19. {
  20. C c;
  21. c.myFunc();
  22. }
<< moderator edit: added [code][/code] tags >>
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,652
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 723
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: vtable

 
0
  #2
Jul 7th, 2005
>What is vtable ?
A fancy term for an array of function pointers.

>How many vtables created for this sample.
Maybe none. The virtual mechanism doesn't have to be implemented using the vtable concept. However, if it did, the answer would probably be one, but it's implementation-defined.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC