Re: bitfield advantages

From: Ben Greear (greear@pollux.cs.uga.edu)
Date: 03/11/96


With respect to unions as bitfields....

I believe a union allocates memory for the LARGEST member of the union,
so if I understand you correctly, every union you used would have to be of...say long long or whatever....


since you can use the | operator on items in your struct bitfield,
I am wondering how big you can make them.... for example, how much of
this would work:

struct bitfield {
   little_bit:   8;
   bigger_bit:   32;
   rockin_on:    64;
   fat_man:      128;
   MIRV:         1024:
};//

if you can do this, does the | still work?  (I would assume it would, if
only the first part works!)


Ben Greear



This archive was generated by hypermail 2b30 : 12/07/00 PST