Thread: virtual base class constructor

  1. #1
    Registered User
    Join Date
    May 2006

    virtual base class constructor

    Hello everyone,

    From MSDN virtual base class reference, what means "If a derived class overrides a virtual function that it inherits from a virtual base class, and if a constructor or a destructor for the derived base class calls that function using a pointer to the virtual base class, the compiler may introduce additional hidden "vtordisp" fields into the classes with virtual bases."

    I do not understand why an additional hidden filed is needed?

    thanks in advance,

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    This is a duplicate of Virtual base class constructor.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 06-20-2008, 02:41 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Virtual Base Classes
    By skewray in forum C++ Programming
    Replies: 11
    Last Post: 12-21-2006, 06:56 PM
  4. Replies: 2
    Last Post: 04-06-2005, 07:25 AM
  5. C++ XML Class
    By edwardtisdale in forum C++ Programming
    Replies: 0
    Last Post: 12-10-2001, 11:14 PM