Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!paradim!jean From: jean@paradim.UUCP (Jean Pierre LeJacq) Newsgroups: comp.lang.c++ Subject: Re: problem with virtual function Summary: No polymorphism in constructors. Message-ID: <274@paradim.UUCP> Date: 21 Aug 90 13:02:42 GMT References: <9008201757.AA23899@sirius.risc.com> Organization: Paradigm Software, Milford, NH Lines: 12 In article <9008201757.AA23899@sirius.risc.com>, ckl@SIRIUS.RISC.COM (Carl K. Lim) writes: > > Hello. I have this problem: when I'm calling a virtual function from a parent > class's constructor, it fails to execute the derived class's function. For > ... Virtual member functions can be called in constructors but the function called will be the one defined in the constructor's own class. This rule prevents access to partially constructed objects. See [E&S: 294]. This also applies to destructors.