[gameprogrammer] Re: Pure virtual function getting called

----- Original Message -----
From: "Triston O'Connor" <tris@xxxxxxxxxxxxx>
To: <gameprogrammer@xxxxxxxxxxxxx>
Sent: Thursday, May 20, 2004 12:55 AM
Subject: [gameprogrammer] Re: Pure virtual function getting called


> When the base class's constructor is called the vtable hasn't been created
> yet so the base constructor has no choice but try to call its own version
of
> the function.
>
> Perhaps you could store a string in your base class and initialise it via
> the base constructor from the derived class.
>
> Good luck.

The problem with that is it calls the base class constructor first and then
the derived constructor.  Since the data I need is used in the constructor,
it doesn't have that data yet.



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: