> I wrote the following test:
>
> union foo { int i; double d; };
>
> int main(int argc, char **argv)
> {
> union foo f = { .d = 4 };
>
> ASSERT_EQ(0, f.i);
> ASSERT_FEQ(4.0, f.d);
>
> return 0;
> }
>
> ASSERT_EQ and ASSERT_FEQ are some macros which checks the falue and
> g
On Mon, Jun 17, 2013 at 01:28:56AM +0300, Sergey Kljopov wrote:
> Hi,
>
> Reading the text
> -
> In a structure initializer, specify the name of a field to
> initialize with `.fieldname =' before the element value. For
> example, given the following structure,
> struct point { int
Hi,
Reading the text
-
In a structure initializer, specify the name of a field to initialize
with `.fieldname =' before the element value. For example, given the
following structure,
struct point { int x, y; };
the following initialization
struct point p = { .y = yvalue,