struct .sizeof

Funog funog at ifrance.com
Mon Aug 28 15:45:00 PDT 2006


Hi,
I usually program in java, so i'm not used to memory management.
For exemple, i do not understand why the following struct

struct Foo
{
  long a;
  byte b;
}

has a .sizeof of 16 ? couldn't it fit in 9 bytes ?
Thanks.



More information about the Digitalmars-d-learn mailing list