Re: redefine and override

From: Francis Glassborow (francis_at_robinton.demon.co.uk)
Date: 05/27/04


Date: Thu, 27 May 2004 21:48:10 +0100

In message <MBotc.93566$dP1.299791@newsc.telia.net>, Tony Johansson
<johansson.andersson@telia.com> writes
>Hello experts!!
>
>I would like to know what is the difference between redefine and override.
>
>I'm reading in a book and here it says a virtual function is one that a
>derived class can override.
>In another place in the book it says generally your classes should use
>virtual function. However, if you
>do not want a derived class to redefine a particular member function, the
>function should not be virtual.
>
>So what exactly is to override and redefine.

Which side of the bed the author got out of that day :-)

-- 
Francis Glassborow      ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects


Relevant Pages

  • Re: How to override virtual function in ATL ?
    ... to override the virual function in derived class Just like MFC way, ... wizard to do so. ... I can copy the signature of virtual function from base class and paste ...
    (microsoft.public.vc.atl)
  • Re: redefine and override
    ... >I would like to know what is the difference between redefine and override. ... >I'm reading in a book and here it says a virtual function is one that a ... If I wanted to measure the natural resonances of any object ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Handling Property and internal (__) attribute inheritance and creation
    ... either redefine the whole property in the derived class, or, if you really intend your property to be overriden, provide a "template method" hook. ... In Python 2.6 and 3.0 you can override the setter, getter or deleter of a property in a subclass. ... You may be able to find a pure Python implementation written by Guido. ...
    (comp.lang.python)
  • redefine and override
    ... I would like to know what is the difference between redefine and override. ... I'm reading in a book and here it says a virtual function is one that a ... do not want a derived class to redefine a particular member function, ...
    (alt.comp.lang.learn.c-cpp)
  • Re: I see no difference in an inheirited non-virtual method and an inheirited virtual method
    ... When accessed through a derived class. ... > When having a virtual function you sould alway include a virtual destructor: ... > should be int main ... I left out the override to ...
    (comp.lang.cpp)