请问printf函数里的\r参数是做什么用的比如printf("this is an example \r\n");哪位能详细说明一下用法,或者给一个例子最好多谢了

解决方案 »

  1.   

    回车。printf的时候,一个"\n"就可以了。
      

  2.   

    你应该学会查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
      

  3.   

    \r represents carriage return
    \n represents new line
      

  4.   

    多谢多谢msdn上我没有找到,真是不好意思,我看看
      

  5.   

    Carriage return是什么东西呀
      

  6.   

    \r\n不是参数,是转义字符!只是代表一个字符。\r 表示 Carriage return 
    \n 表示 New line 用法和一般的字符的用法一样了。
      

  7.   

    \r在AfxMessageBox()里面和\n的作用一样是回车换行。
    但在对文件操作时,\n 和\r 单独使用都不起作用,
    只有一块用才能回车换行。
      

  8.   

    \r 表示 Carriage return   回车 光标到行首,打印机的小车回到最前面
    \n 表示 New line          换行