On Thursday, 17 March 2022 at 00:16:39 UTC, Mike Parker wrote:
On Wednesday, 16 March 2022 at 07:27:06 UTC, test wrote:
```c
struct Test {
    int32_t a;
}
struct Test2 {
    int32_t a;
    Test arr[];
}
```

I need static const init Test2, then pass it to c library late(third library, can not change the type def).


Any time you see a '[]' in C, the equivalent declaration in D has to be a pointer.

Not always with structs....... if it has a fixed size or an initializer in C, then you need to match the size in D.

Otherwise yeah use the pointer.

Reply via email to