A
ajcrm125
I'm trying to utilize bitfields to make my file easier. But for some
reason, I can't assign a value to this structure. I'm sure I must be
missing something:
typedef unsigned short WORD;
WORD data;
union uVCTR {
WORD Ypos : 10; // Y position
WORD Ysign : 1; // Y position sign bit
WORD temp : 1; //
WORD opCode : 4; // 0..100 (8 bits)
} VCTR;
VCTR = data;
"error C2679: binary '=' : no operator defined which takes a right-
hand operand of type 'unsigned short' (or there is no acceptable
conversion)"
Thanks for any info.
VCTR = data
reason, I can't assign a value to this structure. I'm sure I must be
missing something:
typedef unsigned short WORD;
WORD data;
union uVCTR {
WORD Ypos : 10; // Y position
WORD Ysign : 1; // Y position sign bit
WORD temp : 1; //
WORD opCode : 4; // 0..100 (8 bits)
} VCTR;
VCTR = data;
"error C2679: binary '=' : no operator defined which takes a right-
hand operand of type 'unsigned short' (or there is no acceptable
conversion)"
Thanks for any info.
VCTR = data