title: How to prevent console output from cin
body: <p>How does one prevent <code>cin</code> from printing to a console screen in C++? Given this simple program:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      cout &lt;&lt; "Hello World..." &lt;&lt; endl;
  
      cin.clear();
      cout &lt;&lt; "Press ENTER to Continue..." &lt;&lt; endl;
      cin.ignore();
  
      exit(0);
  }
  </code></pre>
  
  <p>So if a user jams away at the keyboard, nothing will happen until <code>ENTER</code> is pressed. This currently works great, but <code>cin</code> dumps the keypresses to the console. How do I prevent this behavior?</p>
  
  <hr>
  
  <p>Edit: I'm working in Visual Studio 2010, and I ask this simple question because I want something not platform specific.</p>