How to writefile in new line in WIN32 API

前端 未结 1 1651
不思量自难忘°
不思量自难忘° 2020-12-22 09:14

I\'m trying to write data to file. However, I want to add new data in new line, but now I can\'t.

HANDLE hFile;
hFile = CreateFile(_T(\"HELLO.txt\"),                 


        
相关标签:
1条回答
  • 2020-12-22 09:40

    Windows uses a CR/LF combination to signify the end of line, you need to write "\r\n" if you want the line break to show up correctly in, e.g., Notepad.

    0 讨论(0)
提交回复
热议问题