Ok, so this is confusing me alot, right now I have a structure as such:
struct f_c_8 {
union {
float f;
unsigned char c[8];
};
};
now I declare a variable of that type
f_c_8 Time;
However,
The following prints correct number
fprintf (output_file_pointer,"\t\tTime: %f\n",event_data->Time);
And the following doesn't print correct number
fprintf (output_file_pointer,"\t\tTime: %f\n",event_data->Time.f);
What I'm confused about is that I'm passing the fprintf the entire structure and saying print a floating point number from that, but if I actually call the floating point number variable, it doesn't print the floating point correctly.
Does this make sense to anyone, anywhere?