How to declare a bitfield without a name in a struct in Cosmic C?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2007-04-16 8:51 PM
Posted on April 17, 2007 at 05:51
How to declare a bitfield without a name in a struct in Cosmic C?
Labels:
- Labels:
-
Legacy Products
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2007-04-15 12:26 AM
Posted on April 15, 2007 at 09:26
On page 3-9 of the ''C Language manual Rev. 1.1'' it says:
''A bitfield without name will be used to skip the corresponding amount of bits in the allocation unit.'' I'm not sure how to do that. Take this example, I want to define a char as bbbxxaaa where I don't care about xx and it should just be skipped (ie a bitfield without a name): struct { char a:3; char :2; char b:3; } Did I do that right? Thanks! -DavidOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2007-04-16 8:51 PM
Posted on April 17, 2007 at 05:51
that's correct.
Regards, Luca (Cosmic)