If you were to declare something like:
struct MyStruct
{
int field1;
int[] field2;
int field3;
}
field 2 is actually a pointer to an array, rather than being the array itself. So MyStruct retains a size of 3 bytes. I wonder if there is a way to do something similar, except that field2 should be the array itself and not a pointer.
Obviously you could do this with just an array, but my final goal is to be able to have different types of varying size in the aforementioned structure; which would require padding (which I do not want).
Is this possible at all?