Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8499231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:36:40+00:00 2026-06-11T00:36:40+00:00

Does virtual inheritance use vTable? If yes or no, Then how it implemented How

  • 0
  1. Does virtual inheritance use vTable? If yes or no, Then how it implemented
  2. How Virtual inheritance behave in memory?
  3. Any other alternative for virtual inheritance

Really appreciate a conceptual explanation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:36:41+00:00Added an answer on June 11, 2026 at 12:36 am

    Virtual inheritance is implemented in different way depending on the compiler.

    1) Yes, both vc and gcc use vTable pointer. But vc has another pointer ref as virtual base pointer.

    2) For a classical virtual inheritance, like Left < Top; Right < Top; Bottom < Left and Right
    The stack should be like this:

    Left.vptr  // -> to its vtable
    
    Left::element_in_left
    
    Right.vptr
    
    Right::element_in_right
    
    Bottom::element_in_bottom
    
    Top::element_in_top
    

    Programs use vptr to find vtable, for gcc, there is a virtual base offset value in viable. vptr + base offset will give the parent address.

    3) I’m not sure what do you mean. There are different ways to implement it in C++ compilers. And other languages have their ways to bind functions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does Android support virtual memory concept? I read it does use paging but not
How does virtual functions work behind the scenes in Inheritance ? Does the compiler
See the code below. a) Does, in this case (simple inheritance, no virtual members),
a struct has public inheritance by default what does this statement really mean? And
I am considering using virtual inheritance in a real-time application. Does using virtual inheritance
Does using virtual inheritance in C++ have a runtime penalty in compiled code, when
I know the virtual keyword does not need to be resused in a derived
Does anyone know why the STL containers don't have virtual destructors? As far as
Does anyone happen to have a copy of the Virtual TreeView that is Delphi5
Why does Sun call their VM for CDC devices C Virtual Machine ? Isn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.