llooJJUU
2016-12-29 09:36
采纳率: 16.7%
浏览 2.1k

QT二进制文件读取问题

一个二进制文件正常读出来的数据应该是这样的图片说明
但是我用流都出来的都是这样的
1 0 65535 65535 0 65535 0 65536 0 65536 0 0 0 0
0 nan 0 -1 0 0 0 -65536 1 0 0 0 0 -65536
0 nan 0 -65536 265006 393220 19464192 4849664 0 0 131072 -65404928 65535 131071
0 2.122e-314 0 0 0 0 1 0 0 0 0 65536 0 0
0 2.122e-314 0 -1 65536 0 -65536 0 0 65535 0 65536 0 1
65536 5.56277e-309 6 297 74 0 0 3 -996 -65536 0 65535 0 65535
4294901760 0 65536 0 0 0 65535 0 0 0 -65535 0 65535 131071
求大神指点这样的二进制二进制文件怎么读?
01 00 00 00 18 fc ff ff 00 00 00 00 00 00 00 00 ff ff 00 00 ff ff 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff 00 00 ff ff 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 01 00 00 00 00 00 01 00 ff ff ff ff 00 00 00 00 00 00 ff ff 2e 0b 04 00 04 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 1a fc ff ff 00 00 ff ff 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 01 00 00 00 00 00 00 00 ff ff ff ff 00 00 01 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 00 00 00 01 00 00 00 ff ff ff ff 2e 0b 04 00 04 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 1c fc ff ff 00 00 ff ff 00 00 00 00 ff ff 00 00 00 00 00 00 ff ff 00 00 00 00 ff ff 01 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 ff ff 00 00 00 00 ff ff 00 00 ff ff 01 00 00 00 ff ff ff ff ff ff 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 ff ff 00 00 00 00 00 00 00 00 01 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 ff ff 00 00 2e 0b 03 00 04 00 07 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 1e fc ff ff 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00 ff ff 01 00 00 00 ff ff 01 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 ff ff 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 01 00 00 00 00 00 ff ff 00 00 00 00 ff ff 00 00 ff ff 01 00 00 00 01 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 2e 0b 04 00 05 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 20 fc ff ff 00 00 ff ff 00 00 00 00 ff ff ff ff ff ff 01 00 00 00 01 00 00 00 ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 ff ff 00 00 00 00 00 00 01 00 ff ff 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 01 00 00 00 00 00 ff ff 00 00 00 00 00 00 ff ff 01 00 ff ff 01 00 fe ff 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 ff ff 00 00 ff ff ff ff 2e 0b 04 00 04 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 22 fc ff ff 00 00 ff ff ff ff 01 00 ff ff 00 00 ff ff 00 00 00 00 00 00 00 00 ff ff 01 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 00 ff ff 00 00 01 00 01 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00 ff ff 01 00 ff ff 00 00 00 00 ff ff ff ff ff ff ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 ff ff 01 00 00 00 01 00 00 00 00 00 00 00 00 00 ff ff 01 00 00 00 00 00 00 00 2d 0b 04 00 04 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 07 00 00 00 24 fc ff ff 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 ff ff 00 00 01 00 ff ff 01 00 00 00 01 00 01 00 01 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 01 00 ff ff 00 00 00 00 01 00 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 00 00 00 00 01 00 ff ff ff ff 00 00 01 00 00 00 00 00 01 00 ff ff 00 00 ff ff 01 00 01 00 00 00 00 00 ff ff 00 00 01 00 01 00 ff ff 00 00 2e 0b 05 00 05 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 26 fc ff ff 00 00 ff ff 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 01 00 00 00 ff ff 00 00 00 00 00 00 01 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 00 00 01 00 ff ff 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 01 00 00 00 00 00 00 00 00 00 ff ff 01 00 ff ff 00 00 01 00 00 00 ff ff 01 00 00 00 ff ff 00 00 2d 0b 04 00 04 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 28 fc ff ff 00 00 ff ff 00 00 00 00 fe ff ff ff 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 00 ff ff ff ff 00 00 00 00 ff ff 00 00 ff ff 01 00 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 ff ff 00 00 01 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 2e 0b 04 00 04 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 0a 00 00 00 2a fc ff ff 00 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 01 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 01 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ff ff 01 00 ff ff 00 00 01 00 00 00 00 00 ff ff 00 00 ff ff 01 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 ff ff 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 2e 0b 03 00 04 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 0b 00 00 00 2c fc ff ff 01 00 00 00 00 00 00 00 ff ff 00 00 ff ff 00 00 00 00 00 00 00 00 ff ff 00 00 01 00 00 00 01 00 00 00 00 00 01 00 01 00 01 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 2d 0b 04 00 04 00 06 00 00 00 29 01 00 00 4a 00 00 00 00 00 00 00 00 00 00 00 0c 00 00 00 2e fc ff ff 00 00

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • threenewbee 2016-12-29 17:06

    贴出你的原始16进制的文件内容、预期的结果和你的程序才好进一步帮你。简单来说,你的流里面读取的数据类型和你的文件格式不匹配。

    打赏 评论

相关推荐 更多相似问题