Converting float values from big endian to little endian

Posted by Bobby on Stack Overflow See other posts from Stack Overflow or by Bobby
Published on 2010-05-06T16:31:20Z Indexed on 2010/05/06 16:38 UTC
Read the original article Hit count: 360

Filed under:
|

Is it possible to convert floats from big to little endian? I have a value from a PowerPC(big endian)platform that I am send via TCP to a Windows process (little endian). 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?

What am I doing wrong?

© Stack Overflow or respective owner

Related posts about c++

Related posts about endianness