
11 Sep
2004
11 Sep
'04
3:50 p.m.
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: #include <pshpack1.hpp> // Your code here #include <poppack1.hpp> Also set alignment for WORD boundaries rather than DWORD. Dave