There actually is a "crlf" stream manipulator which does as one might guess, add a crlf pair to a stream. You should be able to use this in place of endl.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I use
cout << "123" << endl << "456" << endl;
my output window shows:
123
456
as expected. However, when I use a tcpstream object (e.g. tout) which has been connected to from a local client:
tout << "123" << endl << "456" << endl;
my output window shows:
123
456
Any idea how to tell the tcpstream to use '\r\n' instead of '\n' for its endl? Or is there another way to achieve this?
Thanks,
Gary
There actually is a "crlf" stream manipulator which does as one might guess, add a crlf pair to a stream. You should be able to use this in place of endl.