member overridding
From: Dan Moos (dan.moos_at_verizon.net)
Date: 03/08/04
- Next message: Dan Moos: "Re: member overridding"
- Previous message: Brian: "Re: Problems with Make"
- Next in thread: Dan Moos: "Re: member overridding"
- Reply: Dan Moos: "Re: member overridding"
- Reply: Francis Glassborow: "Re: member overridding"
- Reply: jeffc: "Re: member overridding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 08 Mar 2004 06:39:53 GMT
To anyone tired of dealing with my confusion on this matter, I apologize.
Okay, I'm still a little curious about the effects of overridding a
non-virtual member function. Many of you have said "why do I want to do
this, if I don't want polymorphic behaviour"
Here it is in a nutshell. I have a base class with a static member function.
I want to derive from this class. I also want to override the static member
function. I will never deal with an object of the derived class through a
pointer to the base class (no polymorphic behaviour wanted, no virtual
functions needed). Really the only reason I want to derive from this class
is to save work. The base class creates a very simple barebones appplication
framework for a certain O.S. (win32). The derived classes will be taylored
to create more usefull, more specific app frameworks. I really only want to
use inheritance because it will save me the trouble of coding the parts of
the derived classes that is common with the base class.
Anyway, I tried overridding my static member in a simple test class derived
from the base. It appears to works as I intended, calling the correct
version of the static function. Yet I keep hearing that you can't override
non-virtual funtions.
Am I causing undefined behaviour that just "appears" to work, or am I
mis-understanding you folks (highly likely!!)
help!!!
- Next message: Dan Moos: "Re: member overridding"
- Previous message: Brian: "Re: Problems with Make"
- Next in thread: Dan Moos: "Re: member overridding"
- Reply: Dan Moos: "Re: member overridding"
- Reply: Francis Glassborow: "Re: member overridding"
- Reply: jeffc: "Re: member overridding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|