title: How to use carriage return with multiple line?
body: <p>When I want to print out another text in the same line, I can do this:</p>
  
  <pre><code>int i = 0;
  string text = "Paragraph ";
  while (i &lt; 10) {
      if (clock() % CLOCKS_PER_SEC == 0) {
          cout &lt;&lt; text &lt;&lt; i + 1 &lt;&lt; "\r";
          cout.flush();
          i++;
      }
  }
  </code></pre>
  
  <p>But, how I can I do this with multiple line? I want to retain a paragraph as a whole in its initial position in terminal. If I change <code>text</code> with a string that contains paragraph with some newline characters, it prints another new block of paragraph below the last printed.</p>
  
  <p>How can I retain it's position?</p>