Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!swrinde!ucsd!dog.ee.lbl.gov!ux5.lbl.gov!beard From: beard@ux5.lbl.gov (Patrick C Beard) Newsgroups: comp.lang.c++ Subject: Re: Is this a Turbo C++ bug??? Summary: Yes. MPW C++ acts like Zortech. Message-ID: <6990@dog.ee.lbl.gov> Date: 16 Sep 90 02:23:38 GMT References: <6322@gssc.UUCP> Sender: usenet@dog.ee.lbl.gov Reply-To: beard@ux5.lbl.gov (Patrick C Beard) Organization: Berkeley Systems, Inc. Lines: 22 X-Local-Date: Sat, 15 Sep 90 19:23:38 PDT In article <6322@gssc.UUCP> gened@gssc.UUCP (Gene Daniel) writes: # #I think that I have found a bug in Turbo C++. #The following program calls #a member function in the base class which in turn calls a virtual member #function. With Turbo the virtual function in the base class is called #if the instance is a Base class or a Derived class. With Zortech the virtual #function in the derived class is called if the instance is a Derived class #and the function in the base class is called if the instance is a Base class, #which is what I would expect. One interesting item is that if the base class #is declared as virtual then things seem to work as they as they do in Zortech. # #Is this really a bug?? Which compiler got it right??? I believe it is a bug. I've tried your program on a Mac IIfx with MPW C++ 3.1b4 and it behaves as you describe Zortech does. -- ------------------------------------------------------------------------------- - Patrick Beard, Macintosh Programmer (beard@lbl.gov) - - Berkeley Systems, Inc. "..............Good day!" - Paul Harvey - -------------------------------------------------------------------------------