Is it possible to convert floats from big to little endian? I have a big endian value from a PowerPC platform that I am sendING via TCP to a Windows process (li
This value is a float, but when I "memcpy" the value into a win32 float type and then call
_byteswap_ulongon that value, I always get 0.0000?
This should work. Can you post the code you have?
However, if you care for performance (perhaps you do not, in that case you can ignore the rest), it should be possible to avoid memcpy, either by directly loading it into the target location and swapping the bytes there, or using a swap which does the swapping while copying.