title: Read only one char from cin
body: <p>when reading from <code>std::cin</code> even if I want to read only one char. It will wait for the user to insert any number of chars and hit <code>Enter</code> to continue !</p>
  
  <p>I want to read char by char and do some instructions for every char while the user is typing in the terminal.</p>
  
  <h2>Example</h2>
  
  <p>if I run this program and type <code>abcd</code> then <code>Enter</code> the result will be </p>
  
  <pre><code>abcd
  abcd
  </code></pre>
  
  <p>But I want it to be :</p>
  
  <pre><code>aabbccdd
  </code></pre>
  
  <p>Here is the code :</p>
  
  <pre><code>int main(){
      char a;
      cin &gt;&gt; noskipws &gt;&gt; a;
      while(a != '\n'){
          cout &lt;&lt; a;
          cin &gt;&gt; noskipws &gt;&gt; a;
      }
  }
  </code></pre>
  
  <p>How to do that please ?</p>