title: Getline ignoring first character of input
body: <p>I'm just starting with arrays in C++ and I'm having a problem getting the first character of an array.</p>
  
  <p>This is my code,</p>
  
  <p>1- I enter a name, such as "Jim"</p>
  
  <pre><code>char name[30];
  cin.ignore();
  cin.getline(name, 30);
  </code></pre>
  
  <p>2- Right away I try to cout the array</p>
  
  <pre><code>    cout&lt;&lt;"NAME:"&lt;&lt;name; // THIS PRINTS 'im'
  </code></pre>
  
  <p>I was sure it would print 'J'. What am I doing wrong?</p>