Compiler skip getline after cin ( c++ ) : <p>I try to use getline after cin but the compiler ignore it and go directly to next input </p>

<pre><code>int id , age ;
String name;

cin &gt;&gt; id;
getline (cin , name ) ;
cin &gt;&gt; age ;
</code></pre>
