L
Leo Havmøller
Hi,
A struct:
typedef struct
{
int a;
char b;
long c;
} testtype;
A fairly typical way of initializing all field to zero is:
testtype s1 = { 0 };
But i recently came across the following:
testtype s2 = { };
I.e. nothing between the braces.
What does the standards say about that?
Are all fields zeroed like in the first example?
Leo Havmøller.
A struct:
typedef struct
{
int a;
char b;
long c;
} testtype;
A fairly typical way of initializing all field to zero is:
testtype s1 = { 0 };
But i recently came across the following:
testtype s2 = { };
I.e. nothing between the braces.
What does the standards say about that?
Are all fields zeroed like in the first example?
Leo Havmøller.