Getline and ifstream?
<p>I'm having an issue with ifstream and getline in conjucntion.
I have a text document:</p>

<pre><code>1020123456
Madison Williams
90
88
79
86
90
</code></pre>

<p>And want to assign the name into a <code>students[0].name</code> where students is a <code>struct</code> of type student.
I tried using</p>

<pre><code>inFile &gt;&gt; students[0].id;
getline(inFile, students[0].name);
</code></pre>

<p><code>"cout &lt;&lt; students[0].id"</code> yields the ID properly but .name does nothing.</p>

<p>What am I doing wrong here?</p>

<p>And <code>"inFile.getline(students[0].name)"</code> yields errors.</p>
