| Subject: | Re: Union trouble |
|---|---|
| From: | Richard Bos |
| Date: | Fri, 28 Mar 2008 12:04:19 GMT |
| Newsgroups: | comp.lang.c |
"Bartc" <bc@xxxxxxxxxx> wrote:
> 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;
No.
> In particular when the union is inside a struct.
I believe Ganuck offers this as an extension, but it's not ISO C.
Richard
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Convert native character string to ASCII array of integers, Richard Heathfield |
|---|---|
| Next by Date: | Re: printf and cout, pete |
| Previous by Thread: | Re: Union trouble, Bartc |
| Next by Thread: | Re: Union trouble, Keith Thompson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |