union to array
what happens if i try to put an union to array. I want to have two ways of programing the code one way is to use (bits) the other to use intigers. Let me explain in the followinf example:
Now if i want to make a structure out of this, I would make something like this:
coil.ALL Coils; // now i have 200 int variables?
coil.bits.a1 = 1; // the other way to program?
What i want to ask you is if I write the program using the second way (coil.bits.a1 = 1;) it will also change the value of the array? Or I must use pointers? If you have any better solution please feel free to share it.