array of bits field

brnstnd at stealth.acf.nyu.edu brnstnd at stealth.acf.nyu.edu
Wed Feb 14 09:58:40 AEST 1990


In article <1990Feb12.182517.10921 at cubmol.bio.columbia.edu> ping at cubmol.bio.columbia.edu (Shiping Zhang) writes:
> Is there a way to define an array of bits field which are tightly packed?

I believe the only solution is to write out each bit separately. It
isn't too painful.

> struct {
>     int bits[16]:1;
> } bits;

You can't point to a bit, so you can't have an array of bits.

---Dan



More information about the Comp.lang.c mailing list