I get want to define this struct in D:
struct test1 {
struct test1 *prev;
struct test1 *next;
size_t v1;
size_t v2;
size_t v3;
char data[];
};
struct test1 {
test1 *prev;
test1 *next;
size_t v1;
size_t v2;
size_t v3;
char* data;
};
when I compare the size, test1.sizeof is 48 and sizeof(struct test1) from C is 40.
Anyone can explain what should I do with this ?
If I use test1 as member of other struct, the total size will not match.