What's wrong with this picture in MFC VC++ 6.0?
From: Zilla (zilla62XSPAM_at_bellsouth.net)
Date: 02/11/04
- Next message: Dan Bloomquist: "Re: memmove bit array problem"
- Previous message: Dave: "Re: memmove bit array problem"
- Next in thread: Bjarne Nielsen: "Re: What's wrong with this picture in MFC VC++ 6.0?"
- Reply: Bjarne Nielsen: "Re: What's wrong with this picture in MFC VC++ 6.0?"
- Reply: Normand: "Re: What's wrong with this picture in MFC VC++ 6.0?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Feb 2004 11:11:48 -0500
I have the following union
typedef union {
struct stJunk {
unsigned char var1 : 1;
unsigned char var2 : 1;
unsigned char fill : 6;
}stJunk;
unsigned char uJunk;
} Junk;
Junk junk; // declare junk union variable
I can do
junk.stJunk.var1 = 0;
junk.stJunk.var2 = 1;
but not
junk.uJunk = 0x2; // <--- Compile C2143 and C2059 errors.
Why?
This works in GNU!
-Zilla
- Next message: Dan Bloomquist: "Re: memmove bit array problem"
- Previous message: Dave: "Re: memmove bit array problem"
- Next in thread: Bjarne Nielsen: "Re: What's wrong with this picture in MFC VC++ 6.0?"
- Reply: Bjarne Nielsen: "Re: What's wrong with this picture in MFC VC++ 6.0?"
- Reply: Normand: "Re: What's wrong with this picture in MFC VC++ 6.0?"
- Messages sorted by: [ date ] [ thread ]