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 3219522
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:39:21+00:00 2026-05-17T15:39:21+00:00

How does a C++ object know where it’s member function definitions are present? I

  • 0

How does a C++ object know where it’s member function definitions are present? I am quite confused as the Object itself does not contain the function pointers.
sizeof on the Object proves this.
So how is the object to function mapping done by the Runtime environment? where is a class’s member function-pointer table maintained?

  • 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-05-17T15:39:22+00:00Added an answer on May 17, 2026 at 3:39 pm

    If you’re calling non-virtual functions, there’s no need for a function-pointer table; the compiler can resolve the function addresses at compile-time. So:

    A a;
    a.func();
    

    translates to something along the lines of:

    A a;
    A_func(&a);
    

    Calling a virtual function through a base-class pointer typically uses a vtable. So:

    A *p_a = new B();
    p_a->func();
    

    translates to something along the lines of:

    A *p_a = new B();
    p_a->p_vtbl->func(p_a);
    

    where p_vtbl is a compiler-implemented pointer to the vtable specific to the actual class of *p_a.

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

Sidebar

Related Questions

Does anyone know how to delete an object and all of it's related entities.
I wanted to know , How exactly does an Objective C object gets created.
what does this code performs? if(object.jquery){ .... } I don't know what jQuery attribute
I'm getting a Object doesn't support this property or method error, does anyone know
When you serialized an object does it follow pointers. Let say I have a
I have a Sinatra/Mongoid application and I noticed that my mongoid model/object does not
Possible Duplicate: List selectors for obj-c object Does anybody know how to get all
I'm confused about what the word object does in PHP for example: while($row =
Quick question about JavaScript event objects - how does JavaScript know when I'm trying
Does anyone know how to merge two xml files in or two xmllist objects

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.