Quote Originally Posted by Elrond View Post
... Note that WriteString does not add the end of line characters, so you would nee to do it yourself when you need it:

Code:
CString str = _T("String to write\r\n");
file.WriteString(str);
This code is not 100% correct.
you should NOT add CR ('\r') character yourself, only LF ('\n'). CStdioFile::WriteString will then replace
... any newline character ... written to the file as a carriage return–linefeed pair.
So, the correct code is:
Code:
CString str = _T("String to write\n");
file.WriteString(str);