I'm not sure how to go about utilizing a union to hold the information I need.
The union is set up as follows:
union
{
struct
{
float val_1;
float val_2;
} Struct_Words;
struct
{
unsigned char pad3[3];
unsigned char val_3;
unsigned char pad4[4];
} Struct_Bytes;
} Data;
What I ulitmately need to do is to store the val_3 byte into the LS Byte (big endian architecture) of val_2, after val_2 has been determined.
Then, I need to write the data (I'm assuming 8-bytes total for the 'Words' structure) to a binary file.
Any thoughts on how to accomplish this, alternate approaches, etc.?
Thanks for any ideas!!