Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionClassWizard...? Pin
alex.barylski26-Mar-02 11:51
alex.barylski26-Mar-02 11:51 
AnswerRe: ClassWizard...? Pin
Tomasz Sowinski26-Mar-02 11:59
Tomasz Sowinski26-Mar-02 11:59 
GeneralRe: ClassWizard...? Pin
alex.barylski26-Mar-02 12:20
alex.barylski26-Mar-02 12:20 
GeneralRe: ClassWizard...? Pin
Tomasz Sowinski26-Mar-02 12:29
Tomasz Sowinski26-Mar-02 12:29 
GeneralRe: ClassWizard...? Pin
alex.barylski26-Mar-02 12:44
alex.barylski26-Mar-02 12:44 
GeneralRe: ClassWizard...? Pin
Tomasz Sowinski26-Mar-02 12:52
Tomasz Sowinski26-Mar-02 12:52 
GeneralRe: ClassWizard...? Pin
alex.barylski26-Mar-02 13:49
alex.barylski26-Mar-02 13:49 
GeneralRe: ClassWizard...? Pin
Tomasz Sowinski26-Mar-02 22:59
Tomasz Sowinski26-Mar-02 22:59 
HockeyDude wrote:
What exactly do you mean...?

I mean that behavior I've described happens from time to time, especially when I'm dealing with deep class hierarchies.

HockeyDude wrote:
The last time I derived from a class I found I needed to call the virtual parent functions.

Wait, wait, wait. 'Paren functions' are *not* called automatically. To make sure we're talking about the same thing, consider the following class hierarchy:

class B
{
public:
virtual void foo() { printf("In B::Foo\n"); }
};

class D : public B
{
public:
virtual void foo() { printf("In D::Foo\n"); }
};

B* pb = new D;
pb->foo();


You're going to see 'In D::Foo' only. If you want both strings to appear, you have to explicitly call B::Foo in D::Foo. The fact that function is virtual doesn't imply anything about parent class implementation being called (a'la C++ constructors/destructors).

So are we broadcasting on the same wavelength?


Tomasz Sowinski -- http://www.shooltz.com
** If you're going to rape, pillage and burn, be sure to do things in that order. **

GeneralRe: ClassWizard...? Pin
alex.barylski26-Mar-02 23:41
alex.barylski26-Mar-02 23:41 
GeneralRe: ClassWizard...? Pin
Tomasz Sowinski26-Mar-02 23:47
Tomasz Sowinski26-Mar-02 23:47 
GeneralRe: ClassWizard...? Pin
alex.barylski27-Mar-02 0:04
alex.barylski27-Mar-02 0:04 
GeneralRe: ClassWizard...? Pin
Tomasz Sowinski27-Mar-02 0:18
Tomasz Sowinski27-Mar-02 0:18 
GeneralI need HELPPPPPPP!!!!! Pin
ChiYung26-Mar-02 11:14
ChiYung26-Mar-02 11:14 
GeneralRe: I need HELPPPPPPP!!!!! Pin
Tomasz Sowinski26-Mar-02 11:43
Tomasz Sowinski26-Mar-02 11:43 
GeneralRe: I need HELPPPPPPP!!!!! Pin
ChiYung26-Mar-02 11:45
ChiYung26-Mar-02 11:45 
GeneralRe: I need HELPPPPPPP!!!!! Pin
Tomasz Sowinski26-Mar-02 11:50
Tomasz Sowinski26-Mar-02 11:50 
GeneralRe: I need HELPPPPPPP!!!!! Pin
ChiYung26-Mar-02 11:52
ChiYung26-Mar-02 11:52 
GeneralRe: I need HELPPPPPPP!!!!! Pin
Tomasz Sowinski26-Mar-02 11:57
Tomasz Sowinski26-Mar-02 11:57 
GeneralRe: I need HELPPPPPPP!!!!! Pin
26-Mar-02 11:46
suss26-Mar-02 11:46 
Generalfocus Pin
Wizard_0126-Mar-02 10:03
Wizard_0126-Mar-02 10:03 
GeneralRe: focus Pin
Tim Smith26-Mar-02 10:23
Tim Smith26-Mar-02 10:23 
Generalcreating 2 threads at the same time Pin
26-Mar-02 10:01
suss26-Mar-02 10:01 
GeneralRe: creating 2 threads at the same time Pin
Joaquín M López Muñoz26-Mar-02 10:05
Joaquín M López Muñoz26-Mar-02 10:05 
GeneralRe: creating 2 threads at the same time Pin
#realJSOP26-Mar-02 10:04
professional#realJSOP26-Mar-02 10:04 
GeneralRe: creating 2 threads at the same time Pin
Jon Hulatt26-Mar-02 22:32
Jon Hulatt26-Mar-02 22:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.