F
fft1976
Hi
If I open my ifstream in text mode (default ios_base:
penmode?),
std::getline may or may not eat '\r' with '\n', and << '\n' may or
may not write '\r', correct?
(I actually use boost::filesystem::ifstream, but the behavior should
be the same, as it aims to be a replacement)
What I'd like to do is to write the output in the same format the
input was in (even if it's a Unix file on Windows and vice versa).
What's a good way to achieve this? Is binary I/O the only viable
approach?
If I open my ifstream in text mode (default ios_base:
std::getline may or may not eat '\r' with '\n', and << '\n' may or
may not write '\r', correct?
(I actually use boost::filesystem::ifstream, but the behavior should
be the same, as it aims to be a replacement)
What I'd like to do is to write the output in the same format the
input was in (even if it's a Unix file on Windows and vice versa).
What's a good way to achieve this? Is binary I/O the only viable
approach?