title: why cin.sync() can't work
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;istream&gt;
  using namespace std;
  int main()
  {
      char a = '\0';
      char b = '\0';
      cin.get(a);
      cout &lt;&lt; a &lt;&lt;endl;
      cin.sync();
      cin.get(b);
      cout &lt;&lt; b &lt;&lt;endl;
      return 0;
  }
  </code></pre>
  
  <p>input:</p>
  
  <pre><code>sssssssssssssssss\n
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>s
  s
  </code></pre>
  
  <p>The correct result I expect is I can type twice,even though I type many characters the first time! like this:</p>
  
  <p>input:</p>
  
  <pre><code>ssssssssssssssss\n
  </code></pre>
  
  <p>the first cout:</p>
  
  <pre><code>s
  </code></pre>
  
  <p>wait my second typing:</p>
  
  <pre><code>wwwwwwwwwwwww\n
  </code></pre>
  
  <p>the second cout:</p>
  
  <pre><code>w
  </code></pre>
  
  <p>I want to use <code>cin.sync()</code> to clear input buffers, but why it does not work?</p>