title: How to simulate "Press any key to continue?"
body: <p>I am trying to write a C++ program in which when user enter any character from keyboard and it should move to next line of code.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>char c;
  
  cin&gt;&gt;c;
  
  cout&lt;&lt;"Something"&lt;&lt;endl;
  </code></pre>
  
  <p>but this is not working, because it only move to next line when I input some character and then press ENTER.</p>
  
  <p>OR</p>
  
  <p>If I use this</p>
  
  <pre><code>cin.get() or cin.get(c)
  </code></pre>
  
  <p>it move to next line of instruction when I press Enter.</p>
  
  <p>But I wanted it to move to next line on any key pressed on the keyboard, how this can be done?</p>