Re: size of object

From: Howard (alicebt_at_hotmail.com)
Date: 09/14/04


Date: Tue, 14 Sep 2004 15:47:37 GMT


"JKop" <NULL@NULL.NULL> wrote in message
news:wPC1d.27578$Z14.9511@news.indigo.ie...
> > For most implementations, the size of an object is the
> size of its data
> > members, plus one word for the vtable, plus one word for
> the vtable of
> > every base class (direct or indirect) that has virtual
> functions, plus
> > padding.
>
> "plus one word for the vtable of every base class..."
>
> BULL***.
>

Not a very good refutation there. Care to give me the location of this
statement in the standard? :-)

>
> > But I still want to know why you care.
>
>
> It's called curiousity and wanting to know what goes on
> under the hood. What's with the arogant attitude, is it
> because you're an ***?
>

I would venture to say that it's likely *not* just curiosity. It's quite
possible the OP wants to write specific code that relies on this
information, and doing so will obviously cause problems. Asking *why* a
question is being posed often reveals a basic flaw in assumptions, and
catching that error early on prevents problems for the OP in the future.
(It's also a very good teaching technique, forcing the student to evaluate
their own assumptions and not just spoon-feed them information. It helps
them really *learn*, not just memorize.)

-Howard


Quantcast