Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!brutus.cs.uiuc.edu!jarthur!uci-ics!ics.uci.edu!rfg From: rfg@ics.uci.edu (Ron Guilmette) Newsgroups: comp.lang.c++ Subject: A question on pure virtual function members and MI Message-ID: <25A0EE48.4643@paris.ics.uci.edu> Date: 2 Jan 90 18:09:11 GMT Reply-To: rfg@ics.uci.edu (Ron Guilmette) Organization: University of California, Irvine - Dept of ICS Lines: 33 I have a question regarding pure virtual functions and multiple inheritance. I'd like to know why the following short example should be illegal. (Both Cfront 2.0 and G++ 1.36.1 say that it is illegal.) -------------------------------------------------------------------- class abstract { public: abstract (); virtual void method () = 0; }; class concrete { public: concrete (); virtual void method () { } }; class derived : public abstract, public concrete { public: derived (); }; -------------------------------------------------------------------- The language rules require that a class which is derived from an abstract class must define (or again declare as pure virtual) any and all pure virtual functions that are inherited from its parents. Fine. But in the case shown above, why doesn't concrete::method become the definition of derived::method (thereby satisfying the requirement)? // rfg