# The following was supposedly scribed by
# Sisyphus
# on Sunday 19 June 2005 09:06 pm:

>> You *could* add some sort of flag to your struct and an if() to
>> DESTROY().  Alternatively, you could write DESTROY() in perl and
>> call one of two C methods from there.
>
>I can't see how adding a flag to the struct will help - because
> DESTROY() won't be able to access that flag until it has first
> determined whether the struct is a Civilian or a Soldier

Ken's answer had code.  I typically just make stuff up and then go 
looking for how to do it in C :-)

>Yep - 2 different constructors, different methods, and inheritance is
> not an issue (in this particular instance).

I think that's your best bet.  Why would you put them both in the same 
class if they don't have anything in common?

--Eric
-- 
"Politics is not a bad profession. If you succeed there are many
rewards, if you disgrace yourself you can always write a book."
--Ronald Reagan
---------------------------------------------
    http://scratchcomputing.com
---------------------------------------------

Reply via email to