Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!nosc!cod!mball From: mball@cod.NOSC.MIL (Michael S. Ball) Newsgroups: comp.lang.c++ Subject: Re: Virtual functions and missing constructors Message-ID: <1525@cod.NOSC.MIL> Date: 11 May 89 01:59:05 GMT References: <583@hrc63.co.uk> Reply-To: mball@cod.nosc.mil.UUCP (Michael S. Ball) Organization: Naval Ocean Systems Center, San Diego Lines: 21 In article <583@hrc63.co.uk> andrew@hrc63.co.uk (Andrew Haylett "Baddow") writes: >A mysterious problem with C++: your help would be appreciated. > >The problem seems to be that when an instance of a derived class is >created and the only matching constructor is in the base class, this >constructor is used. Fair enough, but this leaves the virtual function >pointer referring to the base class virtual function. Is this: It's a bug, you need an update to the compiler. I suggest you call and get the latest version from Oregon Software. Actually, it was an attempt to imitate a similar bug in cfront so some existing code would work. We eventually decided it was just a bug and the user should fix his code. Sorry you got caught. Mike Ball Taumetric Corporation 1094 Cudahy Pl. Ste 302 San Diego, CA 92110 (619)275-6381 mball@cod.nosc.mil