"Error: no property `offsetof` for type `char*`"
kinke
noone at nowhere.com
Fri Aug 19 14:27:26 UTC 2022
On Friday, 19 August 2022 at 14:22:04 UTC, Steven Schveighoffer
wrote:
> On 8/19/22 9:49 AM, MyNameHere wrote:
>> Thank you, that seems to have resolved the issue, though I
>> wish these sorts of problems would stop cropping up, they are
>> souring the experience with the language.
>
> Most likely that "member" is a macro in C. D doesn't have
> macros, so it uses properties.
Nope, it's really a dynamically sized struct with a last
`CHAR[1]` member:
https://docs.microsoft.com/en-us/windows/win32/api/setupapi/ns-setupapi-sp_device_interface_detail_data_a
Just like with C, these abominations need very special care, and
regularly allocating on the stack or using as an aggregate field
isn't possible.
More information about the Digitalmars-d-learn
mailing list