[GD-General] packing fun
Brought to you by:
vexxed72
From: Daniel V. <vo...@ep...> - 2003-12-25 01:38:04
|
Packing fun. // both gcc 3.0 and VS.NET support the pack pragma #pragma pack(4) struct Alice { int Integer1; char Char1; }; struct Bob : Alice { char Char2; }; gcc 3.0 sizeof(Alice)==sizeof(Bob)==8 and funnier enough, STRUCT_OFFSET(Char2) < sizeof(Alice) VS.NET 2003 sizeof(Alice)==8, sizeof(Bob)==12 Is anyone aware of in-detail documentation on variable packing for both gcc and VS.NET? Thanks, -- Daniel, Epic Games Inc. |