myfile.eof()
不工作turbo c++
。这是我的片段:
while(viofile >> vio.studnumb >> vio.firstname >> vio.lastname >> vio.code >> vio.remarks >> vio.date >> '/`enter code here`' >> vio.month >> '/'>>vio.year >> "Noted by:" >> vio.filler >> vio.position >> vio.user)
{
if(vio.studnumb==studno)
{
cout << endl << studno << ' ' << vio.firstname << ' ' << vio.lastname << ' '<< endl;
cout << "Violation :" << vio.code << ' ' << vio.remarks << ' ' << vio.date << '/' << vio.month<< '/' << vio.year <<endl;
cout << " Noted by: " << vio.positio`enter code here`n << ' ';
cout <<vio.user;
break;
}
else if(viofile.eof())
cout << "You have no violation.\n";
}
我有一个项目要完成。请回复。
谢谢你。