If I had this...
...and this...Code:struct PointType { int x; int y; }; struct RectangleType { PointType topLeft; PointType extent; };
...could I safely binary copy one over to the other?...Code:struct RCType { int Col; int Row; int Cols; int Rows; };
It seems like it should work, but I don't know how the compiler organizes structures.Code:RectangleType Rect = { { 4, 2 }, { 40, 24 } }; RCType RC = *( (RCType*)&Rect );