Re: trying to call a virtual method from constructor of abstract object
From: as mellow as a horse (mail_at_MICKmoss42.fslife.co.uk)
Date: 06/14/04
- Next message: Ben Measures: "Re: Help learning C++ and to decide thx..."
- Previous message: Edo: "Re: Improving programming?"
- In reply to: T.M. Sommers: "Re: trying to call a virtual method from constructor of abstract object"
- Next in thread: T.M. Sommers: "Re: trying to call a virtual method from constructor of abstract object"
- Reply: T.M. Sommers: "Re: trying to call a virtual method from constructor of abstract object"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 13 Jun 2004 23:02:46 +0100
"T.M. Sommers" <tms@nj.net> wrote in message
news:u8adnV-hM-6kP1HdUSdV9g@telcove.net...
> as mellow as a horse wrote:
> >
> > I guess it's obvious that the constructor of CObject can't see the
derived
> > classes definition of init(), but I want any derived object to call
init()
> > automatically, and removing the init() call from the constructor and
adding
> > it to derived concrete classes is not really a solution.
>
> Can you explain why you cannot wait to initialize the
> derived-class object until it exists? I am baffled.
I don't want to do that at all. I just need to ensure that init() is called
(and called first) before anything else. If I can't do that, I'll have to
remove init() altogether and have the user of any derived objects put
anything they would have put inside init inside the derived constructor.
> Thomas M. Sommers -- tms@nj.net -- AB2SB
>
- Next message: Ben Measures: "Re: Help learning C++ and to decide thx..."
- Previous message: Edo: "Re: Improving programming?"
- In reply to: T.M. Sommers: "Re: trying to call a virtual method from constructor of abstract object"
- Next in thread: T.M. Sommers: "Re: trying to call a virtual method from constructor of abstract object"
- Reply: T.M. Sommers: "Re: trying to call a virtual method from constructor of abstract object"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|