Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- union U
- {
- int Set;
- struct
- {
- int A:1;
- int B:1;
- } set;
- }
- U a,b;
- a.set.A = 1;
- a.set.B = 0;
- b.set.A = 0;
- b.set.B = 1;
- a.Set = a.Set | b.Set;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement