How do I print out transfer file progress in console application?

Hi,

I am trying to make a console application that download / transfer file, and I want to show the transfer progress (bytes received), but every time I use cout << bytereceived << endl; I actually made a new line. can someone help me to "rewrite" the number that has been shown in the console

Thank you.



Answer this question

How do I print out transfer file progress in console application?

  • dagfari

    Viorel,
    cout << bytereceived << "\r\n";
    required no



  • Aamir Iqbal

    It works !!

    Thank you



  • patforna

    Nope, that's the whole point. Using a \n will move the cursor to the next line. If you use only \r the cursor goes to the begining of the current line enabling you to write on the same line.


  • SP534

    I hope this suggestion should work:

    cout << bytereceived << '\r';


  • How do I print out transfer file progress in console application?