In Win32 programming a handful of POD structs is used. Those structs often need to be zeroed out before usage.
This can be done by calling memset()
/
The end result is identical (so long as you assume that 0 is always represented by all-zero-bits), so it's largely a matter of style. Personally, I prefer value initialisation, since it is simpler and doesn't require function calls.
Incidentally, you must initialise at least one member:
STRUCT theStruct = {0};
Omitting the 0
is allowed by some C compilers, but not by the C standard. C++ allows the omission, but I prefer to just always use the 0
.