title: C++: how to input text in console and keep it at the bottom
body: <h2>The description of the problems:</h2>
  
  <ul>
  <li>I code a program that prints out some information frequently.</li>
  <li>I want to input some commands during the program running.</li>
  <li><strong>std::out</strong> will flush out my input.</li>
  </ul>
  
  <hr>
  
  <h2>For examples:</h2>
  
  <pre><code>&gt;&gt;&gt; ./my_program
  [sensorA] initial...ok
  [sensorB] initial...ok
  ge //!&lt; I want to input 'get' here but the next output break it
  [motorA] self-check...ok
  t //!&lt; break it into two spice
  </code></pre>
  
  <h2>Expected:</h2>
  
  <pre><code>&gt;&gt;&gt; ./my_program
  [sensorA] initial...ok
  [sensorB] initial...ok
  [motorA] self-check...ok
  get //!&lt; always fixed here whenever I input
  </code></pre>
  
  <hr>
  
  <p>Thanks a lot !</p>