virtual base class constructor

This is a discussion on virtual base class constructor within the Windows Programming forums, part of the Platform Specific Boards category; Hello everyone, From MSDN virtual base class reference, what means "If a derived class overrides a virtual function that it ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    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?

    http://msdn2.microsoft.com/en-us/lib...DownFilterText


    thanks in advance,
    George

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,623
    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, 05: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, 10:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21