steve@hite386.UUCP (Steve Hite) (01/22/90)
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 ~<class-name>() = 0;"? Thanks for the help. -------------------------------------- Steve Hite ...gatech!uflorida!unf7!hite386!steve