Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.dal.ca!aucs!880716a From: 880716a@aucs.uucp (Dave Astels) Newsgroups: comp.lang.c++ Subject: Zortech C++ 2.1 Message-ID: <1990Aug26.152705.10927@aucs.uucp> Date: 26 Aug 90 15:27:05 GMT Organization: Acadia University - School of Computer Science Lines: 57 I recieved my upgrade to 2.1 recently. Looks like a great product so far. ZWB is a definite step up (read LEAP) from ZED. The browsers are neat. One problem: with a Hercules card, the mouse cursor is invisible if not on top of text i.e. it doesn't show when over a blank. Something else.. not a problem, just something that confused me for a while: code that worked in 2.06 didn't with 2.1. The situation is the destructor of a class with two ancestors. The relavent details are: class X { public: virtual ~X () {} } class Y { public: ~Y (); } class Z : public X, public Y { public ~Z () {}; } This is what happens: I want to destruct a Z, seeing it as an X. i.e.: void foo (X * bar) { delete bar; } void snafu () { Z * zzz = new Z; foo (zzz); } The idea is that the call to ~X will turn into a call to ~Z (~X being virtual), which will cause ~X to call ~Y (which is the important bit .. Y contains dynamically allocated storage). The above declaration of Z worked in 2.06, but not in 2.1. I have to make the ~Z method non-inline in order for the linker to work. With ~Z inline, it complains about ~Z not being found .. i.e. the compiler (I hope you're listening, Walter) seesm to loose it. I don't know if this behavior is to be expected on C++ 2.0 or not (my copy of E&S is still on order!). -- "I liked him better before he died" - McCoy, ST V =============================================================================== Dave Astels | Internet: 880716a@AcadiaU.CA PO Box 835, Wolfville, | Bitnet: 880716a@Acadia