r/learncpp • • Aug 23 '21
endianness
When writing numbers to files using ofstream, on my little endian machine those numbers are written in little endian, but I assume that for big endian machines those numbers are written in big endian, I want to be certain ofstream doesn't handle endianness for me. Also how do you suggest I safely write to files?
4
Upvotes
View all comments
Show parent comment
1
u/[deleted] Aug 23 '21
thank you