From what I understand of structure
alignment, it only pads the structure when a member would be placed somewhere
that isn't an even multiple of its own size, or the alignment value whichever is
smaller. So that structure should have
offsets 0, 2 and 4 for Degree, Minute and Second respectively and a size of 8
bytes.
Assuming structure alignment is
4:
struct SExample
{ short foo;
int bar;
};
...will have a size of 8 bytes, with
offsets of 0 and 4 for foo and bar respectively.
Hope this helps.
--
Corey Murtagh The Electric Monk "Quidquid latine dictum sit, altum viditur." |
- Re: [DUG]: How do you explain this? Phil Middlemiss
- [DUG]: Check if file is locked? Jason Coley
- RE: [DUG]: Check if file is locked? Conor Boyd
- RE: [DUG]: Check if file is locked? Dave . Jollie
- Re: [DUG]: Check if file is locked? Paul Mckenzie
- RE: [DUG]: Check if file is locked? Steve Aish
- RE: [DUG]: Check if file is locked? Dave . Jollie
- RE: [DUG]: Check if file is locked? Myles Penlington
- RE: RE: [DUG]: Check if file is locked? Jason Coley
- [DUG]: Sending a record to a C++ DLL Phil Middlemiss
- Re: [DUG]: Sending a record to a C++ DLL Corey Murtagh
- Re: [DUG]: Sending a record to a C++ DLL Phil Middlemiss
- RE: RE: RE: [DUG]: Check if file is locked? Jason Coley
- RE: RE: RE: [DUG]: Check if file is locked? Myles Penlington