Issue
If I have a C++ struct, defining a 64bit data word such as..
struct SMyDataWord
{
int Name : 40;
int Colour : 24;
};
What does the : 40
syntax mean... does it mean that the first 40 bits are reserved for the Name and the remaining 24 bits for the Colour?
This is how it appears to be being used, but I've not come across it before.
Solution
Bitfields, carried over from C. Name
is 40 bits wide, Colour
is 24 bits wide. Your struct therefore has at least 64 bits. On my system 64 bits would be 8 bytes.
Answered By - dirkgently Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.