In Win32 API programming it\'s typical to use C struct
s with multiple fields. Usually only a couple of them have meaningful values and all others have to be zer
I would use value initialization because it looks clean and less error prone as you mentioned. I don't see any drawback in doing it.
You might rely on memset
to zero out the struct after it has been used though.
If your struct contains things like :
int a;
char b;
int c;
Then bytes of padding will be inserted between "b" and "c". memset() will zero those, the other way will not, so there will be 3 bytes of garbage (if your ints are 32 bits). If you intend to use your struct to read/write from a file, this might be important.