🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #324

Re: Can we allow virtual function member declarations to be inherited?

#324
From: Ron Guilmette
Date: Sat, 04 Aug 1990 00:56
20 lines
1396 bytes
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.
Technical Details
Message-ID: <1069@lupine.NCD.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!lupine!rfg
References: <DOVE.90Jul31222153@rocket.uucp> <37923@ucbvax.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <DOVE.90Jul31222153@rocket.uucp> <37923@ucbvax.BERKELEY.EDU>
Distribution: comp
Organization: Network Computing Devices, Inc., Mt. View, CA
Lines: 20