assigning struct to variable

Hi All,,

Whats wrong with following ??

unsigned char myvar;

struct mystruct{
unsigned char aaa:3;
unsigned char bbb:3;
unsigned char ccc:2;
}mystruct = {1,2,3};

myvar = mystruct;

Why is this assignment illegal ?? What is the way around , if any ??

Thankzz && Bye
-Rocknmoon

More questions in this forum