Which method of CFile write a new line in text file ?
C / C++ / MFC
3
Posts
2
Posters
0
Views
1
Watching
-
Miri try the following, you need to add Carriage Return and Line Feed characters to the end of the string to get it to create the file in DOS format and not Unix.
CString strMsg = "Line 1\r\nLine 2\r\n";
CFile OutFile;
OutFile.Write(strMsg, strMsg.GetLength());Michael Martin Pegasystems Pty Ltd Australia martm@pegasystems.com +61 413-004-018
-
Could you use CStdioFile instead, that has a WriteString method.