comp.lang.c
[Top] [All Lists]

Re: Union trouble

Subject: Re: Union trouble
From: "Bartc"
Date: Fri, 28 Mar 2008 11:14:26 GMT
Newsgroups: comp.lang.c

Ok, let's simplify.

Is there a way of using unions transparently, so that the union name doesn't 
get in the way?

So:

union {int a,b;} u;

a=1;

instead of:

u.a=1;

In particular when the union is inside a struct.

-- 
Bart



<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy