Newsgroups: comp.std.c++ Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!st12a From: st12a@menudo.uh.edu (richard henderson~) Subject: Pure functions and derived classes Message-ID: <1991Apr18.233753.26738@menudo.uh.edu> Keywords: Pure functions Sender: st12a@menudo.uh.edu (richard henderson~) Organization: University of Houston Date: Thu, 18 Apr 1991 23:37:53 GMT In the following construction: struct Base { virtual int func_a() = 0; virtual int func_b() = 0; virtual int func_c() = 0; }; struct Mid_a : virtual public Base { virtual int func_a(); virtual int func_b() = 0; virtual int func_c() = 0; }; struct Mid_b : virtual public Base { virtual int func_a() = 0; virtual int func_b(); virtual int func_c() = 0; }; struct Der : public Mid_a, public Mid_b { virtual int func_c(); }; both BC++ and g++ complain that the pure functions Mid_a::func_b() and Mid_b::func_a() are not overridden. What is the proper way to declare this construction? It seemed to me that Mid_a::func_a() should override Mid_b::func_a() and vice-versa. thanks in advance, richard~ st12a@menudo.uh.edu richard@stat.tamu.edu