From: David B. Held (dheld_at_[hidden])
Date: 2004-09-11 10:50:11
Joao Abecasis wrote:
> I took a look at Borland 5.5.1 and was able to come up with a few tricks
> that provide some form of EBO. But it's a no win situation because there
> is no way to actually determine it a given type is empty (with this
> compiler) to start with. For instance, empty classes take up the size of
> the base class. If the (final) base class is empty it's size is 8 but if
> it has a single char data member it's size will be 1!
You need to set structure packing, probably. Something like this:
// Your code here
Also set alignment for WORD boundaries rather than DWORD.