Virtual table in C++

when virtual table is created

Page 1 of 1

4 Replies - 3566 Views - Last Post: 14 November 2010 - 10:32 AM Rate Topic: -----

#1 atul.nerkar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 14-November 10

Virtual table in C++

Posted 14 November 2010 - 07:52 AM

Hi
Can any one please tell me when virtual table get created, Where is address for virtual table is stored. can explain structure of table and how function are retrieved from it. on sequential search for function or some offset is define for each function.

Thanks in advance

This post has been edited by atul.nerkar: 14 November 2010 - 07:54 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Virtual table in C++

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6092
  • View blog
  • Posts: 23,612
  • Joined: 23-August 08

Re: Virtual table in C++

Posted 14 November 2010 - 08:00 AM

Did you TRY Google first???
Was This Post Helpful? 0
  • +
  • -

#3 atul.nerkar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 14-November 10

Re: Virtual table in C++

Posted 14 November 2010 - 08:07 AM

View PostJackOfAllTrades, on 14 November 2010 - 07:00 AM, said:



yes i tried google but not found good answer for how table access specific method if method present at 4 potion how search will start, is it sequential or using some offset
Was This Post Helpful? 0
  • +
  • -

#4 Salem_c  Icon User is offline

  • void main'ers are DOOMED
  • member icon

Reputation: 1741
  • View blog
  • Posts: 3,357
  • Joined: 30-May 10

Re: Virtual table in C++

Posted 14 November 2010 - 09:04 AM

Why do you need to know?

The compiler knows where it is stored, how it is stored and how to use it.

What is more, ANOTHER compiler might choose to do something completely different.
In this context, 'another' also includes upgrading your current compiler.

So back to the first question, what do you want to do that makes it necessary to bind your code in a death grip to one specific compiler?
Was This Post Helpful? 0
  • +
  • -

#5 atul.nerkar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 14-November 10

Re: Virtual table in C++

Posted 14 November 2010 - 10:32 AM

Thanks all
I got answer at question what is polymorphism

Thanks for help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1