Conversion uint32_t in little endian to char array (write in file)


/ Published in: C++
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. uint32_t sumGlobalContentSum = ;
  2.  
  3. sumGlobalContentSum = 4+2+4+audioDataContentSumNonUsed+4 //=d1 [uint32_t audioDataContentSumNonUsed]
  4.  
  5. dstFile << hex << sumGlobalContentSum;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.