Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!apollo!mrst!sdti!turner From: turner@sdti.UUCP (Prescott K. Turner) Newsgroups: comp.lang.c++ Subject: Re: Overload virtual functions? Summary: Yes. Message-ID: <316@sdti.UUCP> Date: 27 Oct 88 02:29:00 GMT References: <1215@tuhold> Reply-To: turner@sdti.UUCP (Prescott K. Turner, Jr.) Organization: Software Development Technologies, Sudbury MA Lines: 22 In article <1215@tuhold>, hoelling@tuhold (Wolfgang Hoellinger) writes: > > sorry, not implemented: virtual derived::f1() overloaded in base > class but not in derived class > > Is there any way to define an overloaded virtual function? > Is this a problem of C++ or just a problem of my compiler? Yes, it is OK to define an overloaded virtual function. My copy of cfront gives the same message in response to your program. The program will compile OK if void f1(int); is defined in class 'derived'. The warning relates to the fact that redefining any 'f1' in a derived class suppresses all variants of 'f1' from the base class. Amazingly, while this feature operates on all variants simultaneously, the virtual aspect of a member function operates on each variant individually. -- Prescott K. Turner, Jr. Software Development Technologies, Inc. 375 Dutton Rd., Sudbury, MA 01776 USA (508) 443-5779 UUCP:...genrad!mrst!sdti!turner