Windows - ZeroMemory macro
Andrej Mitrovic
andrej.mitrovich at gmail.com
Sun May 27 08:46:21 PDT 2012
On 5/27/12, dnewbie <run3 at myopera.com> wrote:
> In C I can write
>
> OPENFILENAME ofn;
> ZeroMemory(&ofn, sizeof(ofn));
>
> In D, there is no ZeroMemory. Please help me.
>
I've never had to use this with WinAPI. The default .init value
usually works well, especially if the struct is well-defined, e.g.:
struct Foo
{
int x; // default 0-initialized
float y = 0; // without this y would be NaN by default
}
I think all bits will be set to 0 for a 'Foo' instance.
More information about the Digitalmars-d-learn
mailing list