行结束字符

  • 如果输入或输出未格式化 (例如,通过 read()write() 方法) ,那么在输出时,换行符 (\n) 不会 扩展为 \r\n ,而在输入时, \r 字符 不会 被除去。
  • 仅限 C + + 语言If the input or output is formatted (via the >> or << operator), newline (\n) characters are expanded to \r\n on output but any \r characters stripped out on input

如果要添加回车符 (\r) 字符,请将 fopen() 函数与 crln=Y (缺省值) 配合使用。