I\'m writing a program on a Linux platform that is generating text files that will be viewed on, inevitably, a Windows platform.
Right now, passing std::endl
Here was my solution to the problem. It's a bit of a mash-up of all the info provided in the answers:
I created a macro in a win_endl.h file for the newline I wanted:
#define win_endl "\r\n"
Then I did a search-and-replace:
sheepsimulator@sheep\_machine > sed -i 's/std::endl/win_endl' *
And ensured all my files included win_endl.h
.