将uint32 从little endian转换为char数组(写入文件)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将uint32 从little endian转换为char数组(写入文件)相关的知识,希望对你有一定的参考价值。
Do you know how to convert uint32_t in little endian to file like char array? I have a variable sumGlobalContentSum (in hex). Than i write in file dstFile. Value of sumGlobalContentSum is realy d1 when I write it out like cout
uint32_t sumGlobalContentSum = ; sumGlobalContentSum = 4+2+4+audioDataContentSumNonUsed+4 //=d1 [uint32_t audioDataContentSumNonUsed] dstFile << hex << sumGlobalContentSum;
以上是关于将uint32 从little endian转换为char数组(写入文件)的主要内容,如果未能解决你的问题,请参考以下文章
c_cpp Ledger SDK解包Big / Little-Endian 8字节Uint64
将带有 CRLF 行终止符的 Little-endian UTF-16 Unicode 英文文本文件转换为 Ascii 编码