Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

How to access anonymous union/struct member from another header data?

$
0
0

I want to access a member of struct from some header data. Here is an example from my code:

char wk1[2];
union 
{
    unsigned short WORD;
    struct 
    {
        unsigned short SSBY:1;
        unsigned short OPE:1;
    } BIT;
} SBYCR;

I want to set bit SSBY to 0 in my main. I tried this

struct pointer BIT;
BIT.SSBY=0;

but it gives me an error E0520070: Incomplete type is not allowed. Any suggestion on how I could access this?


Viewing all articles
Browse latest Browse all 22113

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>