I have a C++ class which has four private floats and a bunch of nonstatic public functions that operate on this data.
Is it guaranteed, or possible to make it so, that the four floats are contiguous and there is no padding. This would make the class the size of four floats, and it's address would be that of the first float.
See Question&Answers more detail:os