Converting float values from big endian to little endian

前端 未结 9 1851
清歌不尽
清歌不尽 2020-11-30 02:40

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

9条回答
  •  感情败类
    2020-11-30 03:13

    It might be easier to use the ntoa and related functions to convert from network to host and from host to network..the advantage it would be portable. Here is a link to an article that explains how to do this.

提交回复
热议问题