This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

struct usage in Uvision4

I am getting errors (fails to compile with numerous errors generated) with this:

typedef struct StatusByte{ unsigned int B0:1; unsigned int B1:1; unsigned int B2:1; unsigned int B3:1; unsigned int B4:1; unsigned int B5:1; unsigned int B6:1; unsigned int B7:1; };

struct StatusByte SysStatus;

void main(void){

SysStatus.B0 = 0x00; //<---ERROR HERE WHICH THROWS EVERYTHING OFF???? //I.E. No Errors when omitted
//more code......
//more code......

}