title: Showing progress in command-line application
body: <p>Ok, I am a bit embarrassed to ask such a simple thing but still.</p>
  
  <p>I have command line utility application and need to show progress to the user.</p>
  
  <p>I could write progress into cout, like this:</p>
  
  <pre><code>std::cout &lt;&lt; "10%\n";
  ...
  std::cout &lt;&lt; "20%\n";
  ...
  std::cout &lt;&lt; "30%\n";
  </code></pre>
  
  <p>... but as a result user will see:</p>
  
  <pre><code>some line printed before
  10%
  20%
  30%
  ...
  </code></pre>
  
  <p>... but what i really need is that percentage got <strong>updated</strong>, like this at the beginning:</p>
  
  <pre><code>some line printed before
  10%
  ...
  </code></pre>
  
  <p>... and after update:</p>
  
  <pre><code>some line printed before
  20%
  ...
  </code></pre>
  
  <p>... and after second update:</p>
  
  <pre><code>some line printed before
  30%
  ...
  </code></pre>
  
  <p>How should I achieve that?</p>