Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!wuarchive!rex!uflorida!unf7!hite386!steve From: steve@hite386.UUCP (Steve Hite) Newsgroups: comp.lang.c++ Subject: Zortech bug in 2.01 -- bug:57502 Keywords: Zortech, C++, bug Message-ID: <8@hite386.UUCP> Date: 21 Jan 90 22:42:29 GMT Organization: Grad Student @ Univ. of N. Florida Lines: 59 The following program segment died in Zortech C++ 2.01: ------------------------- cut here --------------------------- struct point { int x; int y; }; class shape { public: shape(); virtual ~shape() = 0; // cause of death -- ZTCPP1 bug:57502 }; class circle : public shape { point center; int radius; public: circle(int x, int y, int r); ~circle(); }; shape::shape() { } circle::circle(int x, int y, int r) { center.x = x; center.y = y; radius = r; } circle::~circle() { } main() { } ------------------------------ cut here ------------------------------- This code passed compilation on CC 2.0 for 386/ix (distributed by Comeau) and G++ 1.36.1. I realize that this is not a practical example because there is no need for a virtual destructor, but it bombed the compiler. It brings up a question I have anyway: If you want to make a base class explicitly abstract and the only pure virtual function you have is a destructor, then is it good form to say "virtual ~() = 0;"? Thanks for the help. -------------------------------------- Steve Hite ...gatech!uflorida!unf7!hite386!steve