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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:58:50+00:00 2026-06-07T07:58:50+00:00

virtual void dev_class::v_func1() { base_class::v_func1(); cout << This is dev_class’s v_func1() << endl; }

  • 0
virtual void dev_class::v_func1()
{
    base_class::v_func1();
    cout << "This is dev_class's v_func1()" << endl;
}

In dev_class‘s v-table, base_class::v_func1() has already overrided by dev_class::v_func1(). Then, why dev_class::v_func1() can call base_class::v_func1()? Where is the base_class::v_func1() function address storing?

  • 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-07T07:58:51+00:00Added an answer on June 7, 2026 at 7:58 am

    When you use qualified function name in a call, the specified function is called directly, without using any “v-tables”. That applies to calls of base class member function from derived class member function (as in your example). That applies to member function calls in all other contexts as well.

    For example

    base_class *p = new dev_class;
    p->v_func1(); // virtual call - calls `dev_class::v_func1`
    p->base_class::v_func1(); // non-virtual call - calls `base_class::v_func1`
    

    Qualified function names suppress and override virtual dispatch mechanism and effectively turn virtual member function call into an ordinary member function call.

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

Sidebar

Related Questions

class Base { public: virtual void func() const { cout<<This is constant base <<endl;
class BaseClass { virtual void g() { cout<<BaseClass:g()<<endl; } private: virtual void f() {
i have situation like this: class IData { virtual void get() = 0; virtual
I have the following code: public virtual void Initialise() { this.AddHeader(SystemContext, this.UserSettings.SystemContext); } public
take this simple code: class A{ public: virtual void foo() = 0; void x(){
I have something like this: struct D { virtual void operator() {...}; } struct
class Base { public: virtual void foo() const { std::cout << Base; } };
Im getting this exception in the protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged
I have the following: class DThread { virtual void run()=0; _beginthreadex(NULL,0,tfunc,this,0,&m_UIThreadID); // class itself
i have something like this class A { virtual void doBla(A *a) = 0;

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.