C++ compile error
<pre><code>#include&lt;string&gt;
using namespace std;

int main(){
    const int SIZE=50;
    int count=0;
    ifstream fin("phoneData.txt");
    ofstream fout("phoneList.txt");
    string firstName, lastName, phoneNumber;
    if (!fin){
     cout&lt;&lt;"Error opening file. program ending."&lt;&lt;endl;
     return 0;
    }
    while (count&lt;SIZE &amp;&amp; fin&gt;&gt;phoneNumber[count]){
     fin.ignore();
     getline (fin, firstName[count], '\n');
     fin&gt;&gt;lastName[count];
     count++;
    }
    return 0;
</code></pre>

<p>Here is my code so far. in my while loop, something is wrong with the getline, i keep getting an error message like this:</p>

<pre><code>error C2784: 'std::basic_istream&lt;_Elem,_Traits&gt; &amp;std::getline(std::basic_istream&lt;_Elem,_Traits&gt; &amp;,std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;,const _Elem)' : could not deduce template argument for 'std::basic_istream&lt;_Elem,_Traits&gt; &amp;' from 'std::ifstream'
1&gt;        c:\program files\microsoft visual studio 9.0\vc\include\string(475) : see declaration of 'std::getline'
</code></pre>

<p>please help!!! i can't figure it out!</p>
