Is it safe to print 0 (as unsigned char) into a file? Will that mess up (might the filesystem rely on NULL being file termination? )
I am using a std::ofstream
object to write to the file.
Yes, you can write 0
to a file. To close it, just close the file handle.
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