🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6809

C++ questions

#6809
From: Joseph H Allen
Date: Sat, 24 Feb 1990 00:55
14 lines
1168 bytes
How does C++ support virtual functions/objects when there is multiple
inheritence?  I.E., I read that you can inherit two classes which are derived
from the same base class into a new class.  If the base class is declared as
'virtual' in the two derived classes then when you inherit these both into a
new class only one instance of the base class will exist. 

How exactly is this done (implementation-wise)?  How do functions written for
the 2 derived classes know where the instance of the base class is in an
instance of one of these derived classes?  (you can use functions made for
these derived classes in the new class which combines them both, yes?)
-- 
            "Come on Duke, lets do those crimes" - Debbie
"Yeah... Yeah, lets go get sushi... and not pay" - Duke
Technical Details
Message-ID: <9048@wpi.wpi.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!husc6!m2c!wpi!jhallen

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!husc6!m2c!wpi!jhallen
From: jhallen@wpi.wpi.edu (Joseph H Allen)
Newsgroups: comp.lang.misc
Subject: C++ questions
Message-ID: <9048@wpi.wpi.edu>
Date: 24 Feb 90 00:55:19 GMT
Reply-To: jhallen@wpi.wpi.edu (Joseph H Allen)
Organization: Worcester Polytechnic Institute, Worcester ,MA
Lines: 14