title: How to clear cin buffer after reading char
body: <p>I have one problem. Firstly I need to read one character from user input after that I need to read integer. The problem is that if I enter more than one char on first cin, it doesn't request to enter integer value.<br>
  Here is snippet of my code.<br>
  Is there any function to reset or clear buffer of cin.<br>
  I am newbie, sorry if the question is stupid.  Thanks.</p>
  
  <pre><code>int *i = new int;
  int *c = new char;
  std::cin &gt;&gt; *c;
  std::cin &gt;&gt; *i;
  </code></pre>