Changing std::endl to put out CR+LF instead of LF

后端 未结 5 2179
忘了有多久
忘了有多久 2021-02-08 14:09

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

5条回答
  •  面向向阳花
    2021-02-08 14:38

    Windows Notepad is pretty much the only Windows program you'll find that doesn't handle LF-only files properly. Almost everything else (including WordPad) handles LF-only files just fine.

    This problem is a bug in Notepad.

提交回复
热议问题