consider the following type definitions:
when i initialize struct0 and struct1 with some value, lets say:
my compiler (microsoft C 7) won't accept it, it does allow me to do a full or partial intitialization of struct2:
Is not being able to initialize struct0 and struct1 normal behaviour under ANSI-C?
i think my compiler more likely proves its normal, but i would like a second opinion.
thx.
Code:
struct STRUCTURE0
{
int integer0;
};
struct STRUCTURE1
{
int integer1;
struct STRUCTURE2
{
int integer2;
} struct0;
struct STRUCTURE0 struct1;
} struct2;
Code:
...
} struct0 = {0};
and
struct STRUCTURE0 struct1 = {1};
Code:
...
} struct2 = {0,1,2};
or
...
} struct2 = {0,1};
i think my compiler more likely proves its normal, but i would like a second opinion.
thx.