I've written som code that parses through an array of chars and performs bit operations on each char ( each byte).
Now what i would like to do is to reuse this code to parse through all of the bytes of an array of floats and perform those very same bit operations on each byte.
How to best go about this?
If i have my float array:
float* float_array = (float*)malloc(...);
can i then just do:
unsigned char* char_array = (unsigned char*)(float_array);
And just reuse my old code?
Any advice would be much appreciated! Thanks!