N
Niels Dekker - no reply address
Are all the following initializations semantically equivalent?
wchar_t a[8] = {L'\0'};
wchar_t b[8] = {'\0'};
wchar_t c[8] = {0};
wchar_t d[8] = {};
If so, why don't we all use an empty initializer list, {}, when
zero-initializing a C-style string? I was wondering, because the book
C++ Coding Standards (Sutter & Alexandrescu) says at item 19, "Always
initialize variables":
char path[MAX_PATH] = { '\0' };
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
wchar_t a[8] = {L'\0'};
wchar_t b[8] = {'\0'};
wchar_t c[8] = {0};
wchar_t d[8] = {};
If so, why don't we all use an empty initializer list, {}, when
zero-initializing a C-style string? I was wondering, because the book
C++ Coding Standards (Sutter & Alexandrescu) says at item 19, "Always
initialize variables":
char path[MAX_PATH] = { '\0' };
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware