windows 系统下,“\r\n” 是换行
unix 系统下,“\n” 是换行
mac 下,“\r” 是换行
我觉得,你最好打印下面三行,哪一行能换行,就用哪一个。傻瓜的方法最管用
1,\r\n
2,\n
3,\r
和平台有关,\n不行就用\r\n实现