Search:
Forum
General C++ Programming
Unusall decleartion
Unusall decleartion
Aug 19, 2010 at 11:01am UTC
adam42
(3)
I have been given somd source code of a program and I am trying to understand how the program works
I have got a stucture defined as
typedef struct
{
BYTE Material: 4;
BYTE : 6;
}TBMU;
A BYTE is just a renaming of a char type. There was a typedef for this eariler in the code.
The member varable decleartion is unusal and I don't understand what it means. Does anyone know what this is doing?
Aug 19, 2010 at 11:19am UTC
wenqiang
(11)
yeah, i am surprised.
Aug 19, 2010 at 11:39am UTC
helios
(17574)
It's a bit field.
Aug 19, 2010 at 11:47am UTC
adam42
(3)
Sorry, bit feild? I don't think I have come across one before.
Aug 19, 2010 at 12:54pm UTC
jsmith
(5804)
Material is 4 bits and the other is 6 bits.
Aug 19, 2010 at 12:57pm UTC
adam42
(3)
Thanks. I think I understand it now
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs