In my experiments with the following code snippet, I did not find any particular difference whether i created the streams with/without the ios:binary mode:
i
When you want to write files in binary, with no modifications taking place to your data, specify the ios::binary
flag. When you want to write files in text mode, don't specify ios::binary
, and you may get things like line ending translation. If you're on a UNIX-like platform, binary and text formats are the same, so you won't see any difference.