469,090 Members | 1,196 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,090 developers. It's quick & easy.

un named bit fields

Dear all,
what exactly is the purpose of un named bit field such as this

struct
{
int first_bit : 1;
unsigned : 14;
int last_bit : 1;
} bf;
Jun 27 '08 #1
1 1200
On Apr 16, 11:42*am, sophia <sophia.ag...@gmail.comwrote:
Dear all,

what exactly is the purpose of un named bit field such as this

struct
{
* *int first_bit : 1;
* *unsigned * : 14;
* *int last_bit : 1;

} bf;

Spacing. Presumably this structure maps onto some externally defined
layout (given the details of how bit fields are implemented on this
particular implementation), and the ":14" defines a range of 14 unused
(or uninteresting) bits.
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Booted Cat | last post: by
17 posts views Thread by Ben R. | last post: by
8 posts views Thread by Paul | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.