为什么下面的程序会陷入无限循环?
int main()
{
string fname = "C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include\\stdio.h";
char line[985];
ifstream file(fname.c_str());
if(file == NULL)
{
cout<<"unable to open";
exit(0);
}
while(!file.eof())
{
file.getline(line,'\n');
cout<<line<<'\n';
}
}