printf的问题,快速结帖 请问printf函数里的\r参数是做什么用的比如printf("this is an example \r\n");哪位能详细说明一下用法,或者给一个例子最好多谢了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 回车。printf的时候,一个"\n"就可以了。 你应该学会查MSDN。^_^\a Bell (alert) \b Backspace \f Formfeed \n New line \r Carriage return \t Horizontal tab \v Vertical tab \' Single quotation \" Double quotation \\ Backslash\? Literal question \ooo ASCII character in octal notation \xhhh ASCII character in hexadecimal notation \r represents carriage return\n represents new line 多谢多谢msdn上我没有找到,真是不好意思,我看看 Carriage return是什么东西呀 \r\n不是参数,是转义字符!只是代表一个字符。\r 表示 Carriage return \n 表示 New line 用法和一般的字符的用法一样了。 \r在AfxMessageBox()里面和\n的作用一样是回车换行。但在对文件操作时,\n 和\r 单独使用都不起作用,只有一块用才能回车换行。 \r 表示 Carriage return 回车 光标到行首,打印机的小车回到最前面\n 表示 New line 换行 经过修正,还请帮我看看,bind一直出错 关于onctlcolor 谁能帮忙告诉我一个用C++编写的PING远程主机程序 virtual 析构函数 rm格式文件播放问题 关于串口通讯中结束监视线程的问题(总结) 再问组件(ATL)中添加方法失败,the header or the implementation could not be found CTreeCtrl控件父项不显示图标怎么做到? VS2008生成的可执行程序在英文系统下不能运行 在中文系统下没事 怎么创建一个复数类 Com原理与实现 下载 我有一个很棘手地问题,大家帮忙看看吧,谢谢!
\b Backspace
\f Formfeed
\n New line
\r Carriage return
\t Horizontal tab
\v Vertical tab
\' Single quotation
\" Double quotation
\\ Backslash
\? Literal question
\ooo ASCII character in octal notation
\xhhh ASCII character in hexadecimal notation
\n represents new line
\n 表示 New line 用法和一般的字符的用法一样了。
但在对文件操作时,\n 和\r 单独使用都不起作用,
只有一块用才能回车换行。
\n 表示 New line 换行