I noticed some quirks with C++ (not sure if this is the same for C).
I have:
sizeof(C) produces 32, which is mind boggling. Is the C++ compiler trying to align it to the memory structure? This is god awful for doing things like parsing an Ethernet packet, whose header is 14 bytes.
I'm using g++ 3.4.4 on Cygwin.
I have:
Code:
struct A { char a[14]; }; struct B { char b[16]; }; struct C { struct A a; struct B b; };
I'm using g++ 3.4.4 on Cygwin.
Comment