K
kelvSYC
This seems to be easy, and perhaps I'm overthinking it a bit.
Anyways...
I want to use streams to write an int in binary form as a little-endian
byte sequence. Firstly, is the easiest way simply to put the int in a
temporary buffer, then write() the buffer? Secondly, does this count
as formatting (and thus using a custom fstream for binary output with a
customized << operator is justified)?
Anyways...
I want to use streams to write an int in binary form as a little-endian
byte sequence. Firstly, is the easiest way simply to put the int in a
temporary buffer, then write() the buffer? Secondly, does this count
as formatting (and thus using a custom fstream for binary output with a
customized << operator is justified)?