I need to read and write binary data in C++.I use from ofstream
and ifstream
classes but it can't read some chars like 9,13,32.If is there another way to read and write theme.
Open the file using the std::ios::binary
flag and then use read
and write
rather than the streaming operators.
There are some examples here:
http://www.cplusplus.com/reference/iostream/istream/read/
http://www.cplusplus.com/reference/iostream/ostream/write/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With