Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!lupine!rfg From: rfg@NCD.COM (Ron Guilmette) Newsgroups: comp.std.c++ Subject: Re: Can we allow virtual function member declarations to be inherited? Message-ID: <1069@lupine.NCD.COM> Date: 4 Aug 90 00:56:48 GMT References: <37923@ucbvax.BERKELEY.EDU> Distribution: comp Organization: Network Computing Devices, Inc., Mt. View, CA Lines: 20 In article <37923@ucbvax.BERKELEY.EDU> jbuck@galileo.berkeley.edu (Joe Buck) writes: >This is a real issue though; it's one of the things that most frequently >burns me in C++ development. That's because the keyword virtual may >mean two things: define a new virtual function that applies from this >point in the class hierarchy downwards, OR override the baseclass definition >of this function... Wrong. I don't know where you got this strange idea about your hypothetical second meaning for "virtual", but it is wrong. A member function in a derived class always overrides a member function with the same name and parameter-list-profile in the base class(es). That occurs independently on whether or it is is also declared virtual. -- // Ron Guilmette // C++ Entomologist // Internet: rfg@ncd.com uucp: ...uunet!lupine!rfg // Motto: If it sticks, force it. If it breaks, it needed replacing anyway.