Jump to content

Recommended Posts

Posted

Is it possible to have multiple bool arrays and corresponding word values in a single union?

Say I want to create Test_Union, with an array of bool called BitsA and word value WordA;  and also BitsB and WordB- and keep the word values separate.  Is this possible?  Can I create a union of two unions?

I know I can technically create an union with multiple arrays and words, but BitsA would affect WordB and vice versa.


Posted

If you don't want them to affect each other then create a Structure containing Union A and Union B. A Union is specifically designed to share the same memory locations.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...