How to implement "Press Any Key To Exit"
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1449324/how-to-simulate-press-any-key-to-continue">How to simulate &ldquo;Press any key to continue?&rdquo;</a>  </p>
</blockquote>



<p>Here is a simple code in C++:</p>

<pre><code>cout &lt;&lt; "Press Any Key To Exit...";
</code></pre>

<p>What is the code for closing program when user presses any button on keyboard. What should I write after above code?
I know I can use cin.ignore(); and if user presses Enter the program will close, But my target is any key.</p>

<p>How to do that?</p>
