Data structures with different sized bit fields...
Posted
by Bobby
on Stack Overflow
See other posts from Stack Overflow
or by Bobby
Published on 2010-04-19T13:21:37Z
Indexed on
2010/04/19
13:23 UTC
Read the original article
Hit count: 213
c++
If I have a requirement to create a data structure that has the following fields:
16-bit Size field
3-bit Version field
1-bit CRC field
How would I code this struct? I know the Size field would be an unsigned short
type, but what about the other two fields?
© Stack Overflow or respective owner